-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Ranking of aggregated search results based on relevancy of the search result to the user's search query #549
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, the search is much more accurate now too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late review.
Thanks ❤️ for working on this PR. We really appreciate it 👍 Keep it up!! But before we merge this PR. We would like to suggest a few changes. 🙂.
Co-authored-by: neon_arch <mustafadhuleb53@gmail.com>
Co-authored-by: neon_arch <mustafadhuleb53@gmail.com>
Co-authored-by: neon_arch <mustafadhuleb53@gmail.com>
Co-authored-by: neon_arch <mustafadhuleb53@gmail.com>
Co-authored-by: neon_arch <mustafadhuleb53@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks ❤️ again for working on this. Now since everything looks good. We will merge the PR as soon as possible. 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved! Let's merge this in. 👍
What does this PR do?
Implements an algorithm to rank (in other words, sort) the aggregated search results according to the relevancy of the search result based on the user's search query by analyzing three properties of the search results:
Also, check each of the properties for how closely they are related if they are too closely related then it should be the first result in all search results. If it is the least related, then it should be the last result to be shown in all the search results.
Chosen Ranking function: TF-IDF (Term Frequency-Inverse Document Frequency)
This is a weighting scheme often used by search engines as a central tool in scoring and ranking a document's relevance given a user query, find implementation details below:
use-synonyms-search
oruse-non-static-synonyms-search
.Caution
This feature flag enables using an offline thesaurus library (moby) to find synonyms and add them to the relevance calculations), there is both a performance and binary size cost when this feature is used..
For more information on this ranking function, check out this article
Why is this change important?
Currently, the Search engine doesn't sort results by importance or relevance. This PR aims to solve that.
How to test this PR locally?
It can be tested by installing and running Websurfx as mentioned in the docs and on the readme and by launching the browser and thoroughly testing. On searching for a topic, you find that the most relevant results are returned first .
To try out using synonyms, build or run Websurfx with the feature flag
use-synonyms-search
Related issues
Closes #393