From ce5a2335af97dae3e948afea025404bcc6472507 Mon Sep 17 00:00:00 2001 From: Adam Kariv Date: Thu, 18 Apr 2024 13:26:20 +0300 Subject: [PATCH] Add simple cards endpoint --- server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.py b/server.py index f394c95..adbd262 100644 --- a/server.py +++ b/server.py @@ -316,7 +316,7 @@ def simple_cards(): filters = json.dumps([filters]) es_client = current_app.config['ES_CLIENT'] - return blueprint.controllers.search( + return dict(results=blueprint.controllers.search( es_client, ['cards'], q, size=30, offset=0, @@ -324,7 +324,7 @@ def simple_cards(): score_threshold=0, match_type='cross_fields', match_operator='or', - ).get('search_results', []) + ).get('search_results', [])) @app.after_request