Cannot use [sort] option in conjunction with [rescore]

Hi !
I updated Elasticsearch 5.6.0 to 6.1.1. Now I get this exception:
"reason": {
"type": "query_phase_execution_exception",
"reason": "Cannot use [sort] option in conjunction with [rescore]."

In my query I use sort and rescore. This combination worked before in elasticsearch 5.6.0 .

1 Like

I have this same issue and question as well. However, I'm assuming the answer will be that when a sort is specified, that rescore doesn't make any sense since by doing a sort we're telling ES to ignore any other sorting based on the score. Thus, a rescore would have to be ignored anyway. Still, I'd like to have someone in the know verify my assumption. Meanwhile, I'm assuming in my query building code that if I'm going to specify a sort, I should leave out the rescore functions.

Your assumption is right.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.