Opened 3 years ago
Closed 3 years ago
#33788 closed New feature (fixed)
Add support for PostgreSQL pg_trgm strict_word_similarity
Reported by: | Matt | Owned by: | Matt |
---|---|---|---|
Component: | contrib.postgres | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
PostgreSQL's documentation is somewhat unclear when describing the word_similarity
function and does not force the extent boundaries to be the true word boundaries.
See here for wider discussions on the topic: https://www.postgresql.org/message-id/CAPpHfdudo%2B%3DEwzWgyOyKN96e4s0Vrh_%2BA-Yu%3D_L3O1miPVz4Fw%40mail.gmail.com & https://stackoverflow.com/questions/46966360/postgres-word-similarity-not-comparing-words
Out of this came the new strict_word_similarity
function which does respect word boundaries.
Adding a django API for this function would give more options for performing fuzzy text matching. This could also be implemented as an extension to the existing TrigramWordSimilarity
.
Note: this is a PostgreSQL 11+ feature.
Change History (5)
comment:1 by , 3 years ago
Has patch: | set |
---|---|
Owner: | changed from | to
comment:2 by , 3 years ago
comment:3 by , 3 years ago
Patch needs improvement: | set |
---|---|
Summary: | Add support for PostgreSQL pg_trgm strict_word_similarity funtion → Add support for PostgreSQL pg_trgm strict_word_similarity |
Triage Stage: | Unreviewed → Accepted |
comment:4 by , 3 years ago
Patch needs improvement: | unset |
---|---|
Triage Stage: | Accepted → Ready for checkin |
Opened a PR here: https://github.com/django/django/pull/15776