Optionally Return Ranking Info of each result #614
Locked
AymanHamdoun
started this conversation in
Feedback & Feature Proposal
Replies: 1 comment
-
Hey @AymanHamdoun 👋 I'm sorry for not getting back to you sooner. Thank you for all the details you share here. I'm locking that discussion in favor of #594 and I will also copy/paste and link your initial message to the new place. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Feature Description
There is a very useful feature in Algolia where you can send
getRankingInfo = true
in the search request which would return the ranking info (matched words, exact words, typos, etc..) of each result.Feel free to check their API Reference
Basically the results array would then look like this:
How it can be helpful ?
Assume you have several indices, each containing a certain type of entity and you want to search each of these indices and provide one list of mixed results to your users.
Lets say you have a Movies index and a Series index. and I search for "Help".
it would be very helpful to have the rankingInfo of each result, so i can simply merge the two results into one array and sort it by the ranking info attributes (matched words descending, typos descending, exact words descending, etc...)
This is a huge part of my work actually and Algolia makes my result merging logic easy because it provides the rankingInfo for my results. If i were to compute them manually it would be such a waste of time coz the search engine already computed them at one point and i shouldn't need to compute them again. Also if i were to compute them myself, I may as well do so in a slightly different manner than the search engine which would cause some weird inconsistencies.
Beta Was this translation helpful? Give feedback.
All reactions