- Type:
boolean
- Default:
false
- Scope:
search
getRankingInfo
parameter adds a _rankingInfo
object to each result (hit) in the search response.
This object contains detailed metadata about how Algolia ranked the result, including scores from ranking criteria.
_rankingInfo
Object with details about ranking of each result.
Show child attributes
Show child attributes
Number of typos for this match.
Encodes both the attribute index (position in
searchableAttributes
) and the word position.
Divide the number by 1,000 to get the attribute index; the remainder gives the word position.
Used only for attributes set to "ordered"
in searchableAttributes
.For example, if firstMatchedWord
is 2,001: the best-matching attribute is the second attribute in the list,
and the first matched word is the second word within that attribute (both 0-based).For more details, see Understanding word position.Sum of distances between matched query words.
Internal custom ranking score for the record.
(Reserved for internal use by Algolia).
Number of words that matched exactly.
If
alternativesAsExact
is not empty,
it includes matches with plurals or synonyms.Number of matched query words, including prefix and typo-tolerant matches.
Filter scores.
For more information, see Optional filters’ scoring
True if the result was promoted by a rule.
Absent otherwise.
Distance from the query’s location to the matched record’s location, divided by the precision.
Precision for calculating distances, in meters.
All distances are multiples of this setting.
Details about the matched geographic point, including coordinates and distance.
Information about how Personalization influenced this result (if enabled).
Internal name of the server that processed the request.
Index name used for the query.
This may differ in A/B tests.
ID of the A/B test if applicable.
Variant ID (position in the list of variants) used in the A/B test. Starts from 1.
Normalized query string after stop word removal
and advanced syntax processing.
True if facet counts were approximated due to a timeout.
True if the engine did not retrieve all results due to a timeout.
List of index rule IDs applied to the query.
Example
Current API clients
Current API clients
Report incorrect code
Copy
index.search(
new Query("query")
.GetRankingInfo(true)
);
Legacy API clients
Legacy API clients
Report incorrect code
Copy
index.search(
new Query("query")
.GetRankingInfo(true)
);