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

Improved EntireWord Search #55

Merged
merged 2 commits into from May 12, 2015
Merged

Improved EntireWord Search #55

merged 2 commits into from May 12, 2015

Conversation

iget-master
Copy link
Contributor

This pull request implements a better EntireWord Search that gives more relevance to results that starts with the entire search...

Some cases like this search: Lucas do rio

May not show the result Lucas do Rio Verde as first result in this table:

Lucas do Rio Verde
Bahia dos santos do Brasil (Rio grande do sul)
Do do do do (Rio grande do sul)

In my PR:

  • I give a relevance multiplier of 30 to a search LIKE 'lucas do%'. This fix the problem above.
  • I added a trim() to search, to avoid blank spaces to causing performance issues.
  • Moved $like_comparator variable from filterQueryWithRelevance() to getSearchQuery() method

@nicolaslopezj
Copy link
Owner

Can you upload the readme please

@iget-master
Copy link
Contributor Author

Sorry, which readme? I'm new at GitHub collaboration! 👍

@nicolaslopezj
Copy link
Owner

The Readme.md file 🙏🏼

@iget-master
Copy link
Contributor Author

Sure, it should be changed! Just a moment.

@iget-master
Copy link
Contributor Author

Done.

@JulienTant
Copy link
Contributor

I like it :)

nicolaslopezj added a commit that referenced this pull request May 12, 2015
Improved EntireWord Search
@nicolaslopezj nicolaslopezj merged commit edaae62 into nicolaslopezj:master May 12, 2015
@iget-master
Copy link
Contributor Author

Thanks for the PR.

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.

None yet

3 participants