search: Restore multi-lang search

This commit is contained in:
Eragon 2023-08-08 23:39:11 +02:00
parent 621cd40659
commit 7e28531106
Signed by: Eragon
GPG Key ID: 087126EBFC725006
1 changed files with 2 additions and 2 deletions

View File

@ -10,10 +10,10 @@ from flask import request
def websearch_to_tsquery_multilang(search):
return func.websearch_to_tsquery('french', search)
return func.websearch_to_tsquery('french', search).op('||')(func.websearch_to_tsquery('english', search))
def to_tsvector_multilang(text):
return func.to_tsvector('french', text)
return func.to_tsvector('french', text).op('||')(func.to_tsvector('english', text))
@app.route('/rechercher')