diff --git a/avisstage/views_search.py b/avisstage/views_search.py index df5e75e..c1f6efe 100644 --- a/avisstage/views_search.py +++ b/avisstage/views_search.py @@ -158,13 +158,13 @@ def cherche(**kwargs): resultat = Stage.objects.filter(filtres).distinct() if USE_ELASTICSEARCH and use_dsl: - dls_res = [s.meta.id for s in dsl.scan()[:50]] + dsl_res = [s.meta.id for s in dsl.scan()] resultat = resultat.filter(id__in=dsl_res) if tri == "pertinence": resultat = resultat.order_by( Case( - *[When(pk=pk, then=pos) for pos, pk in enumerate(pks)] + *[When(pk=pk, then=pos) for pos, pk in enumerate(dsl_res)] ) ) else: