I am trying to fetch the results with a minimum score of 1 using min_score using the following query but I am still getting responses with null score
I know that my query is bit complex and there could be better ways to implement it, I am new to elasticsearch and still learning. Can anyone help me out with this
{
"constant_score": {
"filter": {
"bool": {
"should": [
{
"multi_match": {
"query": "bone doctor",
"fields": [
"dcName",
"dcCity",
"dcLocation",
"doctorName",
"doctorQualification",
"doctorSpecialization",
"packageName",
"packageFilters"
],
"type": "cross_fields",
"operator": "and"
}
}
]
}
},
"boost": 1
}
},
{
"constant_score": {
"filter": {
"bool": {
"should": [
{
"multi_match": {
"query": "bone",
"fields": [
"dcName",
"dcCity",
"dcLocation",
"doctorName",
"doctorQualification",
"doctorSpecialization",
"packageName",
"packageFilters"
],
"type": "phrase"
}
}
]
}
},
"boost": 1
}
},
{
"constant_score": {
"filter": {
"bool": {
"should": [
{
"multi_match": {
"query": "doctor",
"fields": [
"dcName",
"dcCity",
"dcLocation",
"doctorName",
"doctorQualification",
"doctorSpecialization",
"packageName",
"packageFilters"
],
"type": "phrase"
}
}
]
}
},
"boost": 1
}
},
{
"constant_score": {
"filter": {
"bool": {
"should": [
{
"multi_match": {
"query": "bone",
"fields": [
"dcName",
"dcCity",
"dcLocation",
"doctorName",
"doctorQualification",
"doctorSpecialization",
"packageName",
"packageFilters"
],
"type": "phrase_prefix"
}
}
]
}
},
"boost": 3
}
},
{
"constant_score": {
"filter": {
"bool": {
"should": [
{
"multi_match": {
"query": "doctor",
"fields": [
"dcName",
"dcCity",
"dcLocation",
"doctorName",
"doctorQualification",
"doctorSpecialization",
"packageName",
"packageFilters"
],
"type": "phrase_prefix"
}
}
]
}
},
"boost": 3
}
},
{
"constant_score": {
"filter": {
"bool": {
"should": [
{
"multi_match": {
"query": "bone",
"fields": [
"dcName",
"dcCity",
"dcLocation",
"doctorName",
"doctorQualification",
"doctorSpecialization",
"packageName",
"packageFilters"
],
"type": "most_fields",
"fuzziness": "auto"
}
}
]
}
},
"boost": 1
}
},
{
"constant_score": {
"filter": {
"bool": {
"should": [
{
"multi_match": {
"query": "doctor",
"fields": [
"dcName",
"dcCity",
"dcLocation",
"doctorName",
"doctorQualification",
"doctorSpecialization",
"packageName",
"packageFilters"
],
"type": "most_fields",
"fuzziness": "auto"
}
}
]
}
},
"boost": 1
}
}
]