From 53cea8e89380fb454143f388f61f9c6b1bc70d8a Mon Sep 17 00:00:00 2001 From: GappleBee Date: Tue, 19 Nov 2024 15:49:16 +0000 Subject: [PATCH] Added back missing Trigram classes. --- django/contrib/postgres/search.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/django/contrib/postgres/search.py b/django/contrib/postgres/search.py index bf966a9d34..9396e78341 100644 --- a/django/contrib/postgres/search.py +++ b/django/contrib/postgres/search.py @@ -388,6 +388,24 @@ class TrigramDistance(TrigramBase): arg_joiner = " <-> " +class TrigramWordDistance(TrigramWordBase): + function = "" + arg_joiner = " <<-> " + + +class TrigramStrictWordDistance(TrigramWordBase): + function = "" + arg_joiner = " <<<-> " + + +class TrigramWordSimilarity(TrigramWordBase): + function = "WORD_SIMILARITY" + + +class TrigramStrictWordSimilarity(TrigramWordBase): + function = "STRICT_WORD_SIMILARITY" + + class LexemeCombinable: BITAND = "&" BITOR = "|"