Our application runs a query that has been returning inconsistent results. Using the _preference query option, I was able to determine the number of documents on each shard, and by comparing the counts returned each time with the sum # of documents on different shards, it appears that the query is not hitting all shards every time it runs.
The application utilizes the java transport client. However when I run the query directly via curl request, I am getting back the full result set each and every time.
What further steps can I take to debug why this query doesn't always reach every shard??
Elasticsearch 1.7
3 master nodes
5 data nodes
5 shards
2 replicas
Additionally, in the logs, I DO see that the FIELDDATA breaker is occasionally being tripped. Could this be the cause, that sometimes the breaker trips between say the 3rd and 4th shard, and then the query is abandoned??