andywebb1975 opened a new pull request, #3802: URL: https://github.com/apache/solr/pull/3802
https://issues.apache.org/jira/browse/SOLR-17959 # Description We were surprised by `edismax`'s behaviour for pure-stopword queries, having expected that these would return zero results. Its _'If a query consists of all stopwords, such as "to be or not to be", then all words are required.'_ behaviour is the opposite to what we want as we're using query-time stopwords to prevent particular query terms matching, but there's no way to disable the behaviour other than using `dismax` instead, which may have other impacts. (Using _index_-time stopwords breaks with `mm=100%` - users can't include the stop words in queries.) # Solution This PR adds an `alwaysStopwords` option that disables the default behaviour, enabling stopwords to be _always_ ignored. Also edismax will now explain its output as `MatchNoDocsQuery("")` rather than `+()` when queries are purely stopwords or tokenising characters. # Tests I've added tests for the default and new behaviours. # Checklist Please review the following and check all that apply: - [x] I have reviewed the guidelines for [How to Contribute](https://github.com/apache/solr/blob/main/CONTRIBUTING.md) and my code conforms to the standards described there to the best of my ability. - [x] I have created a Jira issue and added the issue ID to my pull request title. - [x] I have given Solr maintainers [access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork) to contribute to my PR branch. (optional but recommended) - [x] I have developed this patch against the `main` branch. - [ ] I have run `./gradlew check`. - [x] I have added tests for my changes. - [x] I have added documentation for the [Reference Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
