I am upgrading Elasticsearch from v6 to v7. There is one query which is not working for me with track_scores. Same query giving result in v6 but in v7 getting this error "Can't compute score on document as it doesn't match the query"
I checked mapping everything is same. If i pass the same query without track_scores i am getting result
curl --location 'http://localhost:9200/autosuggest/_search' \
--header 'Content-Type: application/json' \
--data '{
"track_scores": true,
"query": {
"bool": {
"should": [
{
"match": {
"all_display_name_variations": {
"query": "benga",
"boost": 1
}
}
},
{
"match_phrase": {
"all_display_name_variations": {
"query": "benga",
"boost": 100
}
}
}
]
}
},
"sort": [
{
"_score": {
"order": "desc"
},
"doc_weight": {
"order": "desc"
},
"_id": {
"order": "asc"
}
}
],
"size": 10,
"suggest": {
"name_suggest": {
"text": "benga",
"completion": {
"field": "name_suggest",
"size": 10
}
},
"fuzzy_suggest": {
"text": "benga",
"completion": {
"field": "name_suggest",
"size": 10,
"fuzzy": {
"fuzziness": 1,
"min_length": 3,
"prefix_length": 1,
"transpositions": true
}
}
}
},
"_source": [
"id",
"name",
"district",
"state",
"is_enabled",
"is_approved",
"is_multi_district",
"is_multi_state",
"is_popular",
"is_capital",
"display_name",
"doc_weight",
"alias_type",
"city_id",
"city_name",
"all_display_name_variations",
"location",
"language"
]
}'