lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Elschot <paul.elsc...@xs4all.nl>
Subject Re: BooleanQuery containing SpanNearQuery throws ArrayOutOfBoundsException .
Date Tue, 28 Mar 2006 21:11:36 GMT
Comments inline below.

On Tuesday 28 March 2006 18:29, Ramana Jelda wrote:
> 
> Hi,
> I have a got strange problem.
> My searchterm : "mp3 player"
> Lucene Query : 
> +(
>   +(
>     spanNear([productName:mp, productName:3], 3, true) 
>     spanNear([subName:mp, subName:3], 3, true)
>    ) 
>  +(productName:player subName:player)
> )
> 
> Throws following lucene BooleanScorer2 exception.
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 3
> 	at
> org.apache.lucene.search.BooleanScorer2$Coordinator.coordFactor(BooleanScore
> r2.java:54)
> 	at
> org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:328)
> 	at
> org.apache.lucene.search.ConjunctionScorer.score(ConjunctionScorer.java:82)
> 	at
> org.apache.lucene.search.BooleanScorer2$2.score(BooleanScorer2.java:186)
> 	at
> org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:327)
> 	at
> org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:291)
> 	at
> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:132)
> 	at
> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:110)
> 	at org.apache.lucene.search.Searcher.search(Searcher.java:76)
> 
> 
> I tried to look at forums and JIRA issues. It seems somewhat it is releated
> to https://issues.apache.org/jira/browse/LUCENE-413 issue.

That seems to be the case indeed.
Would it be possible for you to provide a (preferably small) lucene index that
shows this problem?
When so, could you post it at the jira issue?

> At the same time if I search for "gx3 minolta" which makes a lucene query as
> +(
>  +(
>    spanNear([productName:gx, productName:3], 3, true) 
>    spanNear([subName:gx, subName:3], 3, true)
>   )
>  +(productName:minolta subName:minolta)
> )
> Works fine without any problems.

Similar strange behaviour occurred on the previous occasion.

> Does anyone encountered similar problem.
> Do I totally ignore span queries and switch back to phrasequeries (which
> ofcourse not ordered & a drawback for our search)

You might try the alternative implementation of span queries that is available
at the jira issue. However, even with that, the problem persisted on the 
previous occasion, so the source of the problem seems to be somewhere else.
This is also why a test index would be most welcome.

Regards,
Paul Elschot

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


Mime
View raw message