I need to copy fields from an index to another one using an ingest plugin. I have used the following query:
SearchResponse response = client.prepareSearch("index1", "index2")
.setTypes("type1", "type2")
.setSearchType(SearchType.DFS_QUERY_THEN_FETCH)
.setQuery(QueryBuilders.termQuery("multi", "test")) // Query
.setPostFilter(QueryBuilders.rangeQuery("age").from(12).to(18)) // Filter
.setFrom(0).setSize(60).setExplain(true)
.get();
In the new index I can see the fields added in it but the problem that ES increase the number of documents in the new index continuously but in reality, I have to found the same number of documents of the original index.
How this query is related to the reindex operation?
How is it related to an ingest plugin? Which one?
Then I'm not sure I'm understanding this part:
but the problem that ES increase the number of documents in the new index continuously but in reality, I have to found the same number of documents of the original index.
And finally, please format your code using </> icon as explained in this guide and not the citation button. It will make your post more readable.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.