Create new document on index and update a second document


ES newbie here. Is it possible, say in an ingest pipeline, to store the document into one index and then take some of the fields and update a second index. For example an order document would be stored and a customer document in another index would have its order count and last_order date updated?

Or store some of the document fields in one index and other fields in a second index effectively creating 2 documents from one?


an ingest pipeline can change a document, but in the end it will always only index a single document. I think it makes more sense to index two documents, using the bulk API, one and index operation and one an update operation.

Another way could be to trigger a reindex operation to regularly query for changes in the last n minutes, which uses a script to only store parts of the documents in the other index.

Maybe (just guessing though) the new data frames feature might be worth a look as well.


Thanks Alex, that was what I had been assuming but just wanted to make sure there wasn't some way of doing this directly on ingest.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.