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

Fixed #33788 -- Added TrigramStrictWordSimilarity() and TrigramStrictWordDistance() on PostgreSQL. #15776

Merged
merged 1 commit into from Jun 17, 2022

Conversation

mb1511
Copy link
Contributor

@mb1511 mb1511 commented Jun 16, 2022

Ticket #33788

This PR adds support for the PostgreSQL strict_word_similarity function, <<<-> & %>> operators. This builds on work done in #14833.

This feature requires the pg_tgrm extension to be enabled and requires PostgreSQL 11+. I've run tests on Ubuntu 22 LTS Postgres 12.

@github-actions
Copy link

Hello @mb1511! Thank you for your contribution 💪

As it's your first contribution be sure to check out the patch review checklist.

If you're fixing a ticket from Trac make sure to set the "Has patch" flag and include a link to this PR in the ticket!

If you have any design or process questions then you can ask in the Django forum.

Welcome aboard ⛵️!

Copy link
Member

@felixxm felixxm left a comment

Choose a reason for hiding this comment

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

@mb1511 Thanks for this patch 👍 I left initial comments.

django/contrib/postgres/search.py Outdated Show resolved Hide resolved
docs/ref/contrib/postgres/lookups.txt Outdated Show resolved Hide resolved
docs/ref/contrib/postgres/lookups.txt Show resolved Hide resolved
docs/ref/contrib/postgres/lookups.txt Show resolved Hide resolved
tests/postgres_tests/__init__.py Outdated Show resolved Hide resolved
django/contrib/postgres/apps.py Outdated Show resolved Hide resolved
@mb1511
Copy link
Contributor Author

mb1511 commented Jun 17, 2022

@felixxm Thanks for the quick feedback! 👍 I've addressed all your initial comments.
Also, it's super useful to know 4.2 now only officially supports PG12+ 🙌

@felixxm felixxm changed the title Fixed #33788 - Add trigram strict word similarity lookup Fixed #33788 - Added TrigramStrictWordSimilarity() and TrigramStrictWordDistance() on PostgreSQL. Jun 17, 2022
@felixxm felixxm changed the title Fixed #33788 - Added TrigramStrictWordSimilarity() and TrigramStrictWordDistance() on PostgreSQL. Fixed #33788 -- Added TrigramStrictWordSimilarity() and TrigramStrictWordDistance() on PostgreSQL. Jun 17, 2022
@felixxm
Copy link
Member

felixxm commented Jun 17, 2022

@mb1511 Thanks 👍 Welcome aboard ⛵

I pushed small edits to docs.

@felixxm felixxm merged commit 8d160f1 into django:main Jun 17, 2022
@felixxm felixxm temporarily deployed to schedules June 18, 2022 03:13 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants