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

deal with long name searches #6

Merged
merged 1 commit into from
Apr 16, 2018
Merged

deal with long name searches #6

merged 1 commit into from
Apr 16, 2018

Conversation

nicpottier
Copy link
Collaborator

fixes this case:
https://sentry.io/nyaruka/textit/issues/529592597/

Which is caused by us creating ngrams for only the first 8 characters of each name. The search term however was going through the standard analyzer so wasn't matching due to that term being 9 characters. This PR changer our search analyzer to truncate the term at 8 chars. Added test as well.

Note this also changes the minimum name search length to be 2 chars.

@nicpottier nicpottier requested a review from dodobas April 16, 2018 16:59
@codecov-io
Copy link

Codecov Report

Merging #6 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master       #6   +/-   ##
=======================================
  Coverage   79.53%   79.53%           
=======================================
  Files           1        1           
  Lines         171      171           
=======================================
  Hits          136      136           
  Misses         20       20           
  Partials       15       15
Impacted Files Coverage Δ
indexer.go 79.53% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 542a1e1...628ab6c. Read the comment docs.

@nicpottier nicpottier merged commit 425db6e into master Apr 16, 2018
@nicpottier nicpottier deleted the fix-long-names branch April 16, 2018 18:10
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.

3 participants