diff --git a/avisstage/views_search.py b/avisstage/views_search.py index bedc8a1..9d92700 100644 --- a/avisstage/views_search.py +++ b/avisstage/views_search.py @@ -136,11 +136,12 @@ def cherche(**kwargs): # Application + resultat = Stage.objects if USE_ELASTICSEARCH and use_dsl: - filtres &= Q(id__in=[s.meta.id for s in dsl.scan()]) + resultat = dsl.to_queryset(True) #print(filtres) - resultat = Stage.objects.filter(filtres) + resultat = resultat.filter(filtres).distinct() tri = 'pertinence' if not use_dsl: