-
Notifications
You must be signed in to change notification settings - Fork 363
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
Fix bug suggestions with PostgreSQL #7988
Conversation
@Archaeopteryx Hello. |
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.
@Archaeopteryx I looked as your examples, and updated the test with that bug suggestion match from treeherder.mozilla.org. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7988 +/- ##
==========================================
+ Coverage 77.06% 77.08% +0.01%
==========================================
Files 544 545 +1
Lines 26940 26958 +18
Branches 3382 3382
==========================================
+ Hits 20762 20780 +18
Misses 6011 6011
Partials 167 167 ☔ View full report in Codecov by Sentry. |
|
* Use trigram similarity instead of FTS * Skip escaping special characters * Order results by match ranking on Postgres --------- Co-authored-by: Bastien Abadie <[email protected]> Co-authored-by: Sebastian Hengst <[email protected]>
Closes #7986
This PR adds a unit test that reproduce the bug suggestion described by @Archaeopteryx in #7986 that appeared when switching prototype database to Postgresql.
It turns out we cannot rely on Postgresql Full-Text search capabilities for this use-case, as we are trying to mostly match filenames or paths with special characters like slashes or underscores, but postgresql search functions are optimized for tokenization with specific languages instructions (basically we do not search for english...).
So we had to reproduce the Mysql implementation:
ILIKE
clause