Move wcs_tsquery to a specific criteria
gitea/wcs/pipeline/head There was a failure building this commit Details

This commit is contained in:
Pierre Ducroquet 2024-03-04 10:44:05 +01:00
parent eb175c397e
commit 0627f6274c
1 changed files with 5 additions and 0 deletions

View File

@ -369,6 +369,11 @@ class FtsMatch(Criteria):
def get_fts_value(cls, value):
return unidecode.unidecode(value)
def as_sql(self):
return 'fts @@ plainto_tsquery(%%(c%s)s)' % id(self.value)
class WcsFtsMatch(FtsMatch):
def as_sql(self):
return 'fts @@ wcs_tsquery(%%(c%s)s)' % id(self.value)