You can see that the total document count, max score, and the score of top 2 docs are all same. But the 2nd document from two clusters are different, although the score are same.
Thanks reply.
Yes, you are right, the 1031_1 also appears in first cluster results (at 6th position), the score is also 3.3488574. I think that is why we got different result from two cluster.
Any solution to force two cluster always return exactly same docs with same order?
You can use sort to sort by _score then by another field (like a date).
If you really want to have the exact same results, you need to have exactly the same data files everywhere (also primary and replicas).
Cluster1:
Set replicas to 0
Snapshot the index
Set replicas to 1
Cluster2:
Delete old index
Restore index from the repository you created earlier
Set replicas to 1
But as soon as you will index new data, your system could diverge again.
It's not really what I'd do.
Sorting by _score only means that you don't care of anything else then the score. So even if results are different on both cluster, they are correct.
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.