The overridesForField option in the querybuilder provides a convenient way to break up input text into terms with which to construct queries. If multiple terms occur, these generate multiple queries combined with SHOULD.
There are cases where a MUST combination is more appropriate. For example in an autocomplete scenario. If you type in "Rio de Jan", you may want the autocomplete function to return "Rio de Janeiro", but not "Rio Grande do Sul".
I propose adding .overriodesForField(String fieldName, String analyzerName).requireAllTerms()
this scenario could also take care of HSEARCH-1302 and eliminate stopwords from being used as termqueries
|