Indexing from a query with script

Hi there,

Is there a way to populate an index with the results of a query? I guess yes, but can I apply a script before putting the data in the destination index?

Thanks in advance

J.

The reindex API does that basically.

Thanks for the fast answer.
Just a question, how do I refer to the fields in the source and these in the destination?

Thanks in advance

J.

reindex API reads the whole _source and reindex it entirely.
If you need to modify the _source field, then use an ingest pipeline.

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