How can I save the results of the DSL query directly to another index?

It's like executing the following SQL statement:
INSERT INTO ANOTHER_TABLE SELECT * FROM ONE_TABLE WHERE age BETWEEN 16 AND 45;

Thank you very much for your answer:)

You should take a look at reindex API https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html

1 Like

Great! that's the answer I want!!
In addition to being able to copy one index to another, reindex also supports adding query parameters
Thank you~

I'm glad to help

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