[ 
https://issues.apache.org/jira/browse/LUCENE-5128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shai Erera updated LUCENE-5128:
-------------------------------

    Attachment: LUCENE-5128.patch

I made this trivial change and added a test. However, 
TestShardSearching.testSimple fails if run with -Dtests.seed=3626FF5A675BE28. 
What happens is that the shard sets after=Integer.MAX_VALUE to denote no more 
docs should be collected from that shard.

Now, this is just test code and I'm sure there's a better way to handle it 
(i.e. why run search at all against that shard if no docs should be 
collected?), but I checked TopScoreDocCollector and TopFieldCollector to 
understand where would they throw AIOOBE and I couldn't find the place. Looks 
like they just ignore any doc passed to collect(). Could you please paste the 
stacktrace? Perhaps it's a different collector that we need to fix?

I will also check if it's possible to fix test shards to not search this shard 
if no docs should be collected
                
> Calling IndexSearcher.searchAfter beyond the number of stored documents 
> causes ArrayIndexOutOfBoundsException
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-5128
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5128
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/search
>    Affects Versions: 4.2
>            Reporter: crocket
>         Attachments: LUCENE-5128.patch
>
>
> ArrayIndexOutOfBoundsException makes it harder to reason about the cause.
> Is there a better way to notify programmers of the cause?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to