Convert ParseContext.Document to json


#1

I'm trying to write an elasticsearch plugin where I return changes to an index, along with the documents that changed.

I have access to instances of org.elasticsearch.index.mapper.ParseContext.Document, but I can't figure out how to convert them to a JSON objects (similar to the "_source" property that is usually returned in searches). Is there an easy way to do this?


(system) #2