On ES 7.2 and using Elasticsearch Client for Node JS.
After I delete a document from my ES index, I sometimes have a brief period of time where future queries will return null results so they don't have a body or hits that is empty which is what I would expect if there were no results from the search. I am wondering if anyone has encountered this in the past and if there is something I have setup wrong in my index. I am potentially looking at setting up a retry if this case occurs since it tends to only happen after a delete and for a short period of time.
I am also looking at using wait_for so the refresh takes place before the response returns from the delete. Could the problem be that I am attempting to fetch new results right after the delete operation occurs and it is busy updating?