Elasticsearch delete or update a document should reflect in two indexes from server side


(banupriya) #1

If I have two index, Ex: sample1 and sample2.
If I delete or update a value in sample1 then the corresponding document should also deleted or updated in sample2?

Data : sample1 : {name: 'Tom', id: '1', city: 'xx', state, 'yy', country: 'zz'}
sample2 : {id: '1', city: 'xx', state, 'yy', country: 'zz'}
If I delete id: '1' then this document should be deleted from both the index from the server side itself. How to do this ?
The problem will be if I delete the values separatley then if I end up in network issue after deleting value from one index the other index will have values how to avoid this ?


(Mark Walkom) #2

You need to issue deletes against each discrete index.


(banupriya) #3

I need to achieve by using multiple indices option


(system) #4