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 Matt, 3 years ago

Has patch: set
Owner: changed from Matt Brewer to Matt

comment:3 by Mariusz Felisiak, 3 years ago

Patch needs improvement: set
Summary: Add support for PostgreSQL pg_trgm strict_word_similarity funtionAdd support for PostgreSQL pg_trgm strict_word_similarity
Triage Stage: UnreviewedAccepted

comment:4 by Mariusz Felisiak, 3 years ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:5 by Mariusz Felisiak <felisiak.mariusz@…>, 3 years ago

Resolution: fixed
Status: assignedclosed

In 8d160f15:

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

Note: See TracTickets for help on using tickets.
Back to Top