You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Peter Keegan (JIRA)" <ji...@apache.org> on 2014/07/18 17:31:06 UTC

[jira] [Created] (SOLR-6256) ReRankCollector.topDocs throws ArrayIndexOutOfBoundsException if there are no hits (V4.9)

Peter Keegan created SOLR-6256:
----------------------------------

             Summary: ReRankCollector.topDocs throws ArrayIndexOutOfBoundsException if there are no hits (V4.9)
                 Key: SOLR-6256
                 URL: https://issues.apache.org/jira/browse/SOLR-6256
             Project: Solr
          Issue Type: Bug
            Reporter: Peter Keegan


The exception occurs if the main query returns 0 hits. Simple fix:
TopDocs mainDocs = mainCollector.topDocs(0, reRankDocs);
if (mainDocs.totalHits == 0) {
    return mainDocs; // nothing to do.
}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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