andywebb1975 opened a new pull request, #2488: URL: https://github.com/apache/solr/pull/2488
_work in progress!_ If anyone sees this and has thoughts on it, please comment below :-) # 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. # Solution This PR adds an `alwaysStopwords` option that disables the default behaviour. Its name is TBD. I've noticed that the query plan becomes `+()` rather than `MatchNoDocsQuery("")` for pure-stopword queries, also when the query contains only tokenising characters (e.g. punctuation). Does this make any difference? # Tests _TO DO!_ # Checklist Please review the following and check all that apply: - [ ] 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. - [ ] I have created a Jira issue and added the issue ID to my pull request title. - [ ] 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) - [ ] I have developed this patch against the `main` branch. - [ ] I have run `./gradlew check`. - [ ] I have added tests for my changes. - [ ] 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: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org