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();
Thanks for the response , yes we are not waiting for the refresh the previous event ; how to ensure this ? is there default waiting period which we can apply the query ? is there any other query API we need to use as per the ES version listed in the thread. Please provide detailed solution. Thanks
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.