Index-Switch

Can anyone help me with switching of indexes with reindexing old one without loosing new data that is indexed on old index during the time of reindexing .

Could you be a bit more elaborate? :slight_smile:

ok , let explain the problem
i have millions of documents that have been indexed are more come every minute and according to need i have to change templates time to time and have to reindex whole lot of documents again , now problem arises when new documents are indexed in old index during the time of re-indexing , that lot is lost .
How to sync both the index and then discard old one ?
suggest any solutions?

Have a write index and a read index. The write index points to the active index and the read index covers both the active and old index.

Then in your code you will need to use the read index to query, and then deal with any duplicates in queries.

Sorry , but i could not get what you are suggesting , please explain more

Yes i got what are you suggesting , but can you tell me how get the timestamp of last update of document so that i can re-index in my new index and then discard the old one

Do you have a timestamp in the document you can use for this?

No i don't have time stamp in my ES , i am enquiring is there any timestamp field that is managed my elastic search only because if i give value of timestamp from application , due to network delay values will not be reflected correct and if es server give me i can manage it more efficiently

You will need to add that then.

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