Hi am running into the following scenario and I am hoping that someone can shed some light on this.
I have an integration test that follows the following design
- insert 8 documents in an elastic index,
- Each item has a unique string in the title field of the document (a uuid)
- Because this process is async, after each insertion we wait until we can find the item we attempted to insert in elastic
- Do a search on the unique string present in the title field of each of the documents, limit the results by 3 and use 0 as the offset
Problem :
Most of the times this will return a set of 3 documents and a total number of hits that is 8
But on occasion it thinks that the number of hits matching the query is 7, which is incorrect
Then if you wait a small amount of time eventually the total becomes 8 again. How can this happen ?
Especially considering that i validate that each of the items that have been inserted is retrievable
My setup is 3 elastic nodes, 5 shareds 1 replica. Elastic search 1.5.1
Locally I cannot reproduce this problem in any shape way or form