lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramana Jelda" <ramana.je...@ciao-group.com>
Subject BooleanQuery containing SpanNearQuery throws ArrayOutOfBoundsException .
Date Tue, 28 Mar 2006 16:29:36 GMT

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.
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.

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)


Jelda


---------------------------------------------------------------------
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