I recently noticed that some of our queries returned inconsistent results, digging deep, I found that the query returned 0 results when the query was executed against one replica and returned results when executed against the other copies (we have 3 copies in total). I used the search API with
preference=_only_nodes:<node> to deduce the above.
When I tried to use the
explain API with
_source=true and see what the response is, it looks like the document is present in all the replicas, but the output of the explain API returns
matched:false against one copy and returns
matched:true against another copies. The actual search query used is a
Why would this happen? Is this a known issue/bug in Elasticsearch?
I noticed that ES 5.6 had some issues where docs are missing in replica https://github.com/elastic/elasticsearch/issues/19866, is it related to the same?
Elasticsearch version: 5.6