Skip to content

Weigh search results according to where the keywords are found #182

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

Merged
merged 2 commits into from
Jan 6, 2022

Conversation

gotlougit
Copy link
Contributor

This is help improve search results. Right now if word is found in the
title, it gets 5 points, if in the description it gets 3 points and if
in the command description, it gets 1 point.

This is help improve search results. Right now if word is found in the
title, it gets 5 points, if in the description it gets 3 points and if
in the command description, it gets 1 point.
Titles get 7 points, the description of the command gets 5 points, and
the example commands get 2 points. If keywords are found in the line, 1
point is given regardless
@gotlougit
Copy link
Contributor Author

By giving even more weightage according to where the word was found, and also giving every match 1 point regardless, I was able to solve the issues that were cropping up with the search in previous commits.

@MasterOdin MasterOdin self-requested a review December 31, 2021 04:28
Copy link
Collaborator

@MasterOdin MasterOdin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've no real opinion on the numbers here, more trusting you've done testing on it, but easy enough to tweak the numbers again in the future.

@gotlougit
Copy link
Contributor Author

gotlougit commented Jan 5, 2022 via email

@MasterOdin MasterOdin merged commit 3821624 into tldr-pages:main Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants