Skip to content
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

Fuzzy sort better adjusted score #908

Merged
merged 5 commits into from
Feb 22, 2016
Merged

Conversation

Calvinp
Copy link
Contributor

@Calvinp Calvinp commented Feb 19, 2016

Requests and tasks that were searched from the requests (or tasks) page would sometimes filter to the bottom of search results despite containing the search term. This is because the fuzzy search algorithm only favored requests that started with the term (and not even that for tasks).
This fixes that, giving the highest score to requests or tasks that start with the search term, a medium score to requests or tasks that contain the search term, and a low score to others.

Calvin Pomerantz added 2 commits February 19, 2016 10:36
…ains but doesn't start with the search term
… tasks that start with the search term, medium for tasks that contain the search term, and low for tasks that don't contain the search term
@ssalinas
Copy link
Member

logic looks good. Now that this is replicated in two places, can we move the score adjusting logic maybe into utils.coffee? Then we just have one place to update if we want to change it

@Calvinp
Copy link
Contributor Author

Calvinp commented Feb 19, 2016

The score adjusting logic is moved into utils.

ssalinas added a commit that referenced this pull request Feb 22, 2016
@ssalinas ssalinas merged commit c09b4d3 into master Feb 22, 2016
@ssalinas ssalinas deleted the fuzzy_sort_better_adjustedScore branch February 22, 2016 14:30
@ssalinas ssalinas added this to the 0.4.11 milestone Feb 23, 2016
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