Closed mikemccand closed 5 years ago
Commit 02792de0e5501bab780a50f7f692da89c1460165 in lucene-solr's branch refs/heads/master from Atri Sharma https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=02792de
LUCENE-8905: Better Error Handling For Illegal Arguments (#769)
[Legacy Jira: ASF subversion and git services on Sep 05 2019]
Commit 106ae969e000c4829c38bf5b124f3ab59a89b4b4 in lucene-solr's branch refs/heads/master from Atri Sharma https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=106ae96
Harden Up TestDiversifiedTopDocsCollector (#858)
TestDiversifiedTopDocsCollector.testInvalidArguments should check for exceptions and corresponding messages, post LUCENE-8905
[Legacy Jira: ASF subversion and git services on Sep 05 2019]
Commit 321dc809275b53bd735eddb85f645d415b28d058 in lucene-solr's branch refs/heads/branch_8x from Atri Sharma https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=321dc80
Harden Up TestDiversifiedTopDocsCollector (#858)
TestDiversifiedTopDocsCollector.testInvalidArguments should check for exceptions and corresponding messages, post LUCENE-8905
[Legacy Jira: ASF subversion and git services on Sep 05 2019]
Commit 106ae969e000c4829c38bf5b124f3ab59a89b4b4 in lucene-solr's branch refs/heads/jira/SOLR-13677_3 from Atri Sharma https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=106ae96
Harden Up TestDiversifiedTopDocsCollector (#858)
TestDiversifiedTopDocsCollector.testInvalidArguments should check for exceptions and corresponding messages, post LUCENE-8905
[Legacy Jira: ASF subversion and git services on Sep 08 2019]
Closing after the 9.0.0 release
[Legacy Jira: Adrien Grand (@jpountz) on Dec 08 2021]
While writing some tests, I realised that TopDocsCollector does not behave well when illegal arguments are passed in (for eg, requesting more hits than the number of hits collected). Instead, we return a TopDocs instance with 0 hits.
This can be problematic when queries are being formed by applications. This can hide bugs where malformed queries return no hits and that is surfaced upstream to client applications.
I found a TODO at the relevant code space, so I believe it is time to fix the problem and throw an IllegalArgumentsException.
Legacy Jira details
LUCENE-8905 by Atri Sharma (@atris) on Jul 08 2019, resolved Sep 05 2019