As you can see, in the first_index the field content is marked to not be stored in _source and the same field is not indexed in second_index. I want to use it as a backup for future reindexing.
When I do reindexing of the first_index I'm about to lose the content field. Is there some way how to fill the content field from the second_index?
Well, but is Reindex API able to merge documents or do I have to store all documents twice?
I mean in first_index I have document with all searcheable fields content and title in my example, but to save the space I was thinking to have only field content.
Documents are not merged, but rewritten (they miss title field) when I try to use this
I suppose there is no such merging built-in function for re-index.
I'm not sure it works, but one possibility is to set enrich processor on the destination third_index for the reindex from first_index. You can add some fields from the matched document in the second index.
Note: I am assuming your first index had content and title field and this simple script will just merge the values of these two fields and store it in content field of second_index. Hope this helps.
Update: You can test it, by simply indexing 2 documents(I already did) and search on second index as
Hi Amit,
thanks for your response, but this is not what I wand. I don't want to merge two fields from the same index to the new one. This is easy.
I want to merge field field title from first_index and field content from second_index into the new third_index.
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.