Skip to content

Commit

Permalink
query: improve control of the simple parameter
Browse files Browse the repository at this point in the history
Co-Authored-by: Bertrand Zuchuat <[email protected]>
  • Loading branch information
Garfield-fr committed Apr 21, 2021
1 parent c0573b5 commit 3cefb81
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rero_ils/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,8 @@ def _default_parser(qstr=None, query_boosting=[]):
"""Default parser that uses the Q() from elasticsearch_dsl."""
query_type = 'query_string'
default_operator = 'OR'
if request.args.get('simple'):
simple = request.args.get('simple')
if simple and simple == '1':
query_type = 'simple_query_string'
default_operator = 'AND'

Expand Down

0 comments on commit 3cefb81

Please sign in to comment.