Hi Team,
I have seen caps in field names while doing a search. Specially inside should block which contributes to score. I tried doing similar thing to see the effect but score remained same whatever number I gave after ^. Below is the sample query:
{
"query": {
"function_score": {
"score_mode": "sum",
"boost_mode": "sum",
"boost": 1,
"query": {
"bool": {
"should": [
{
"constant_score": {
"filter": {
"multi_match": {
"fields": [
"firstName.analyzed^2"
],
"query": "*John"
}
},
"boost": 1.2
}
},
{
"constant_score": {
"filter": {
"multi_match": {
"fields": [
"lastName.analyzed^8"
],
"query": "*Cena"
}
},
"boost": 1.4
}
}
]
}
}
}
}
}
Here, firstName and lastName has ^with value of 2 and 8. Using explain api I checked document score with different values but it remained same.
So my query is why do we use ^ operator in search queries ? Does it have any impact on the result sets returned in terms of number or order.
Any hint or idea may help me in understanding this.
Thanks,