Hello,
I have a current write index and multiple read indexes .Is it possible to delete the documents from only the read indexes? Document with same ID will be present in both read and write index but I want the document to be deleted only from read index.
It sounds like you want to delete from all indices in the index pattern except the one pointed to by the write alias. Is that correct? If so, that is as Mark pointed out possible but I do not think there is any easy way of addressing just these indices so you probably need a two stage process to find out which indices are to be deleted from and then list these explicitly.
It should be as easy as index-pattern-0*, as the alias is likely going to be index-pattern and all the underlying indices will have numbers preceding them.
It might help if you described your use case. Maybe ILM with rollover is not the best fit for your requirements if you need to update documents and maintain only a single copy.
@Christian_Dahlqvist the use case here is as soon as I update the document in the write index ,I no longer need the other documents with the same ID which are present in read index, because when I try to get the documents I need the latest one, so I want to delete the documents in read index asynchronously, basically deletion of documents in read index should happen as a post process of updating a document in write index
What drove the decision to use rollover? How much data do you have? How is this expected to grow over time? What are your requirements around retention? How frequently are documents updated?
Once a document is updated I no longer need the older ones , Documents will be updated very frequently so when I try to get I just need the latest one, I don't need multiple documents with the same ID
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.