[Django] #33788: Add support for PostgreSQL pg_trgm strict_word_similarity funtion

30 views
Skip to first unread message

Django

unread,
Jun 16, 2022, 10:16:59 AM6/16/22
to django-...@googlegroups.com
#33788: Add support for PostgreSQL pg_trgm strict_word_similarity funtion
--------------------------------------------+-----------------------------
Reporter: Matt | Owner: Matt Brewer
Type: New feature | Status: assigned
Component: contrib.postgres | Version: dev
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
--------------------------------------------+-----------------------------
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.

--
Ticket URL: <https://code.djangoproject.com/ticket/33788>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 16, 2022, 10:50:43 AM6/16/22
to django-...@googlegroups.com
#33788: Add support for PostgreSQL pg_trgm strict_word_similarity funtion
----------------------------------+--------------------------------------
Reporter: Matt | Owner: Matt

Type: New feature | Status: assigned
Component: contrib.postgres | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------
Changes (by Matt):

* owner: Matt Brewer => Matt
* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/33788#comment:1>

Django

unread,
Jun 16, 2022, 10:51:20 AM6/16/22
to django-...@googlegroups.com
#33788: Add support for PostgreSQL pg_trgm strict_word_similarity funtion
----------------------------------+--------------------------------------
Reporter: Matt | Owner: Matt
Type: New feature | Status: assigned
Component: contrib.postgres | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------

Comment (by Matt):

Opened a PR here: https://github.com/django/django/pull/15776

--
Ticket URL: <https://code.djangoproject.com/ticket/33788#comment:2>

Reply all
Reply to author
Forward
0 new messages