Indexing from a query with script


(Juan Aramis) #1

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.


(David Pilato) #2

The reindex API does that basically.


(Juan Aramis) #3

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.


(David Pilato) #4

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


(system) #5

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