[ 
https://issues.apache.org/jira/browse/LUCENE-8905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16923644#comment-16923644
 ] 

ASF subversion and git services commented on LUCENE-8905:
---------------------------------------------------------

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

> TopDocsCollector Should Have Better Error Handling For Illegal Arguments
> ------------------------------------------------------------------------
>
>                 Key: LUCENE-8905
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8905
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Atri Sharma
>            Priority: Major
>             Fix For: master (9.0)
>
>          Time Spent: 7.5h
>  Remaining Estimate: 0h
>
> 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.
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to