You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Adrien Grand (Jira)" <ji...@apache.org> on 2019/09/05 14:16:00 UTC
[jira] [Resolved] (LUCENE-8905) TopDocsCollector Should Have Better
Error Handling For Illegal Arguments
[ https://issues.apache.org/jira/browse/LUCENE-8905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adrien Grand resolved LUCENE-8905.
----------------------------------
Fix Version/s: master (9.0)
Resolution: Fixed
> 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: 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org