summaryrefslogtreecommitdiff
path: root/django/contrib/postgres/lookups.py
diff options
context:
space:
mode:
authorNikita Marchant <nikita.marchant@gmail.com>2021-09-15 12:57:49 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-09-17 13:05:15 +0200
commit4e4082f9396e21de0bd88dbfc651da9ad01c7c0c (patch)
tree34d93d1ef520a097f95cf46cd854ea47700214ef /django/contrib/postgres/lookups.py
parent4ca508a68916dd43da45fd6e8b9004824a62d9c8 (diff)
downloaddjango-4e4082f9396e21de0bd88dbfc651da9ad01c7c0c.tar.gz
Fixed #32492 -- Added TrigramWordSimilarity() and TrigramWordDistance() on PostgreSQL.
Diffstat (limited to 'django/contrib/postgres/lookups.py')
-rw-r--r--django/contrib/postgres/lookups.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/django/contrib/postgres/lookups.py b/django/contrib/postgres/lookups.py
index 28d8590e1d..f7c6fc4b0c 100644
--- a/django/contrib/postgres/lookups.py
+++ b/django/contrib/postgres/lookups.py
@@ -58,3 +58,8 @@ class SearchLookup(SearchVectorExact):
class TrigramSimilar(PostgresOperatorLookup):
lookup_name = 'trigram_similar'
postgres_operator = '%%'
+
+
+class TrigramWordSimilar(PostgresOperatorLookup):
+ lookup_name = 'trigram_word_similar'
+ postgres_operator = '%%>'