Default Sort Order in Constant Score Query

Hi, I wanted to know what is the default sort order for elasticsearch when using a constant score query. Also what is the mechanism for tie breaking.


there is no guaranteed order in constant score and no tie breaker (internally it is about internal ids within lucene, but this could change anytime within a lucene release, despite it being unlikely).

Is there any question hidden behind the question? What is the reason for asking this?

Thank you for replying the reason for asking this is I am implementing a ranking based on match information instead of tfidf, so wanted to understand the tie breaking behavior.

as sorting can be based on multiple values, it might be best to just sort based on multiple criterias - however if the score is constant, then sorting by another criteria only makes sense. The script_score query is most interesting for you I assume.

Thank you will try that out.