The search factory might receive as an argument the query_parser that should be used. The issue is that, when this class is created, this argument is not specified, so there is no way of overwriting it.
I do want a different parser to be able to do an And of the terms, instead of an OR. I would like to be able to pass a function like:
def _query_parser_and(qstr=None):
"""Parser that uses the Q() with AND from search engine dsl."""
if qstr:
return dsl.Q("query_string", query=qstr, default_operator='AND')
return dsl.Q()
Package version (if known): 2.3.1
Describe the bug
The search factory might receive as an argument the query_parser that should be used. The issue is that, when this class is created, this argument is not specified, so there is no way of overwriting it.
I do want a different parser to be able to do an
And
of the terms, instead of anOR
. I would like to be able to pass a function like: