Problem: Multi-term search queries not tokenized into separate must clauses
Current Behavior
Search terms entered in the search box are searching as a quoted string. For example, searching for term1 term2 with default_operator: "AND" results differ from term1 AND term2.
Searching for term1 term2 seems to be treated as a single string in one must query clause (term1 term2).
Expected Behavior
According to the AtoM Docs : "Search terms entered in the search box are, by default, searched with an “AND” operator - that is to say, searching for kitty cat would by default search kitty AND cat."
Searching for term1 AND term2 should be parsed into 2 separate must queries (first for term1 and second for term2) to the BoolQuery, to match the behavior of an explicit term1 AND term2 search.
Possible Solution
Parse the search query by tokenizing on whitespace and add each term as a separate must clause to the BoolQuery.
Context and Notes
Bug in ES 6+
Version used
AtoM 2.9+