Very simple case, I need to sort docs by one field, say, 'money'. What will the order be if the money of several docs are equal. I use filter to query cuz scores are not necessary. Here's my query example:
I have no idea about the order, but as that order is not specified, I don't think designs that rely on it are recommended even if there is in fact some order.
If you need some fixed order, you can use _doc as follows.
random_score for function score query is enough for you? It returns random score based on internal Lucene doc ids as a source of randomness, which is renumbered by merges.
If you want differente results even for repeated same query, maybe you have to use some script field with painless.
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.