I'm using ES 1.6 and I faced an issue with term suggestion recently :
a. When I set "size" to 8, I got suggestions like "1, 2, 3, 4, 5, 6, 7, 8"
b. When I set "size" to 10 or bigger, I got suggestions like "1, 3, 2, 4, 7, 6, 9, 10"
The results in both cases is correct but the order is difference, and in some case the results of (b) don't contains the results of (a)
Is it because of the way ES travel through shards ?
I tried "preference" option but seem not worked for suggestion.
I also set "shard_size" to a high value but seem affect performance and not a complete solution ?
I want to keep the same order when "size" increase, do you have any suggestions or idea on this ?
Thanks a lot.
Yes.
You can determine the potential for inaccuracy in a result using this: Terms Aggregation | Elasticsearch Guide [1.6] | Elastic
If you decide you want 100% accurate doc_counts for the top terms returned you can always make a second request passing them in a terms query to narrow the scope of things you are aggregating.
Wait a bit, are we discussing on suggestion (completion) in ES ?
I faced that problem when using suggestion and try to return same results when "size" parameter increased.
BTW the issue seem similar to your case.
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.