We have two different queries built using ElasticSearch Java API. First is update & second is delete on the same type of dicument. If the difference between firing the first & second query from user action is more than 20 sec then update & delete both working properly. But if after the update user delete it immediately the document is getting updated but not getting deleted.
From the logs we have checked the delete query is getting triggered properly and we are not getting any exception in java while deleting it from Java API.
Any help will be highly appreciated.
Elastic Search version : 2.1.1, Lucene Version : 5.3.1
Delete Query Java API :
DeleteByQueryResponse id = new DeleteByQueryRequestBuilder(esClient, DeleteByQueryAction.INSTANCE)
.setIndices(indexName)
.setTypes(type)
.setQuery(QueryBuilders.matchQuery("id", id))
.execute()
.actionGet();