You could use an elasticsearch input and an elasticsearch output, preserving the index name and document id from the docinfo metadata. Alternatively, if you are just adding new fields use an elasticsearch input and write out a file using the bulk and update APIs and then use curl to POST that into elasticsearch. This thread has some discussion of that.