Index, delete, index results in missing document?

Hi - We have an odd problem in ElasticSearch 0.19.8. We are using external
versioning, but under some circumstances we know things have got out of
sync. When this happens, we are deleting the document(s) in question, and
then immediately reindex them (if we didn't do the delete, we'd get a
version conflict exception when indexing).

However, when searching we find these documents are then missing - it's as
if the delete has somehow silently prevented the index from working? Is
this a known issue?

We've discovered that if we add a sleep of more than 60 seconds between the
delete and the second index, then the document is correctly indexed, so it
appears that delete is continuing to do something asynchronous after our
call returns. Is there any way to make the call full synchronous? Or a
better way of forcing a document to index when we know there will be a
version conflict?

On Friday, 10 August 2012 16:23:06 UTC+1, Michael Snell wrote:

Hi - We have an odd problem in Elasticsearch 0.19.8. We are using external
versioning, but under some circumstances we know things have got out of
sync. When this happens, we are deleting the document(s) in question, and
then immediately reindex them (if we didn't do the delete, we'd get a
version conflict exception when indexing).

However, when searching we find these documents are then missing - it's as
if the delete has somehow silently prevented the index from working? Is
this a known issue?

Hi - I've now opened a bug/feature request that has better info: index.gc_deletes=0s does not behave as expected · Issue #2166 · elastic/elasticsearch · GitHub

On Friday, 10 August 2012 16:42:07 UTC+1, Michael Snell wrote:

We've discovered that if we add a sleep of more than 60 seconds between the delete and the second index, then the document is correctly indexed, so it appears that delete is continuing to do something asynchronous after our call returns. Is there any way to make the call full synchronous? Or a better way of forcing a document to index when we know there will be a version conflict?

On Friday, 10 August 2012 16:23:06 UTC+1, Michael Snell wrote:Hi - We have an odd problem in Elasticsearch 0.19.8. We are using external versioning, but under some circumstances we know things have got out of sync. When this happens, we are deleting the document(s) in question, and then immediately reindex them (if we didn't do the delete, we'd get a version conflict exception when indexing).

However, when searching we find these documents are then missing - it's as if the delete has somehow silently prevented the index from working? Is this a known issue?

--