TrigramWordSimilar
This class provides a PostgreSQL-specific lookup for word-level trigram similarity. It utilizes the "%% >" operator to determine if the trigram similarity between a field and a given string exceeds a specific threshold.
Attributes
| Attribute | Type | Description |
|---|---|---|
| lookup_name | string = trigram_word_similar | The name of the lookup used in Django querysets to perform trigram word similarity comparisons. |
| postgres_operator | string = %% > | The specific PostgreSQL operator used in the SQL query to evaluate if the left-hand side is word-similar to the right-hand side. |
Constructor
Signature
def TrigramWordSimilar()
Methods
trigram_word_similar()
def trigram_word_similar() - > boolean
Performs a PostgreSQL trigram word similarity comparison using the '%% >' operator to determine if the left-hand side is similar to the right-hand side.
Returns
| Type | Description |
|---|---|
boolean | True if the word similarity between the expressions meets the configured PostgreSQL threshold, otherwise False. |