Fix search2?

This commit is contained in:
Robin Champenois 2021-06-28 23:00:32 +02:00
parent 370447d355
commit 46eacc94da

View file

@ -73,9 +73,21 @@ def cherche(**kwargs):
if field_relevant("generique"):
#print("Filtre generique", kwargs['generique'])
dsl = dsl.query(
"match",
_all={"query": kwargs["generique"],
"fuzziness": "auto"})
"multi_match",
query = kwargs["generique"],
fuzziness = "auto",
fields = [
'sujet^3',
'encadrants',
'type_stage',
'niveau_scol',
'structure',
'date_*',
"lieux.*^2",
"auteur.nom^2",
"thematiques^2",
"matieres"
])
use_dsl = True
# Sujet -> Recherche dan les noms de sujets et les thématiques