June 2017
Beginner to intermediate
404 pages
8h 22m
English
To debug how the relevance score is calculated for the text-search query, you can use the explain query parameter during the search as shown here:
POST chapter6/_search?explain { "query": { "match": { "description" : "hiking" } } }
The response of the query will have the explanation of the calculation. Each hit along with the source of the document will also contain the details of how the score is calculated. Let's take explanation of a single hit and walk through:
"_explanation": { "value": 0.98908687, "description": "weight(description:hike in 0) [PerFieldSimilarity], result of:",
The explanation will contain the score of the hit, description and the details. The value (0.98908687) is the score calculated for ...
Read now
Unlock full access