I wonder how to find out if the the document was already deleted from the ES, not just marked as deleted.
I have a pack of data that consist of multiple documents that I want to be indexed by the fulltext. I use only index and delete operations since I am using the external version. I am using the bulk api to lower the number of calls.
There might be a multiple packs of data each with its separated routing.
It can happen that I would need to synchronize some pack of data in the ES. My data is only keeping information about deleted documents for some time so in the event of loosing connection with ES for longer I would not know that those documents should be deleted.
Therefore I did expect that I will use delete_by_query call to delete all documents with specified routing and then index them again. However in order to do that I would need to know when it is safe to index data again without version conflicts.
I keep separated type which holds my latest synchronized version in the data so I thought that if I will delete it as last one then if the ES is purging the deleted files sequentially that it would be safe to start index again, however I am not sure if that is such case.
Is there any better way how to find out that there is such a file on the ES that is just marked delete?
Thank you for your answer.