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

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

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)



> 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
>          Time Spent: 7h 10m
>  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