Skip to content

Commit

Permalink
Add simple cards endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
akariv committed Apr 18, 2024
1 parent ce5a233 commit 979e2ef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,15 +316,16 @@ def simple_cards():
filters = json.dumps([filters])

es_client = current_app.config['ES_CLIENT']
return dict(results=blueprint.controllers.search(
return blueprint.controllers.search(
es_client, ['cards'], q,
size=30,
offset=0,
filters=filters,
extra='distinct-situations|distinct-responses',
score_threshold=0,
match_type='cross_fields',
match_operator='or',
).get('search_results', []))
)


@app.after_request
Expand Down

0 comments on commit 979e2ef

Please sign in to comment.