Reputation: 41
I have Table : User, with fields say firstName, lastName
If I search for Amit and use only searchField as firstName, i get different scores.
$count=true&search=Amit^2&searchFields=firstName&$select=firstName&queryType=full
"value": [
{
"@search.score": 7.986226,
"firstName": "Amit"
},
{
"@search.score": 7.986226,
"firstName": "Amit"
},
...
...
...
{
"@search.score": 7.986226,
"firstName": "Amit"
},
{
"@search.score": 7.9655724,
"firstName": "Amit"
},
Above is small resultset but i can see score changing after 15-20 results.
I was expecting same score if firstName is same, since complex query can be sort on score, last Name.
Upvotes: 1
Views: 181
Reputation: 787
The search score for a document is a combination of how well a document matches a query and how relevant it is compared to "nearby" documents. Depending on the exact partitioning of documents into shards, exact matches may get different scores, but they will always score higher than non-exact matches.
Upvotes: 1