Nice catch -- thanks! I will fix. Mike
On Fri, Jul 30, 2010 at 11:20 AM, jayendra patil <jayendra.pa...@gmail.com> wrote: > Working on the nightly build of solr and lucene - > > MultiPhraseQuery throws ArrayIndexOutOfBounds Exception for the words > defined as synonyms > > SEVERE: java.lang.ArrayIndexOutOfBoundsException: 5 > at > org.apache.lucene.search.MultiPhraseQuery$MultiPhraseWeight.scorer(MultiPhraseQuery.java:191) > > if (terms.length > 1) { > postingsEnum = new UnionDocsAndPositionsEnum(reader, terms); > > // coarse -- this overcounts since a given doc can > // have more than one terms: > docFreq = 0; > for(int j=0;j<terms.length;j++) { > // Should be j > docFreq += reader.docFreq(terms[*i*]); > } > } else { > > The for loop seems to iterate on terms length with variable j, but refers to > i within the loop which is iterating on the search terms count. > > Regards, > Jayendra > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org