From 26ad68ff693984886fdb3ab78f55ae41c7b0fc0a Mon Sep 17 00:00:00 2001 From: Robin Champenois Date: Mon, 28 Jun 2021 23:29:58 +0200 Subject: [PATCH] Fix search --- avisstage/views_search.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: