You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by René Ferréro <re...@yahoo.fr> on 2003/03/23 22:03:05 UTC

Query with stop word + AND operand : java.lang.ArrayIndexOutOfBoundsException

Hi,
1- If a stop word is the first term of AND operator,
ArrayIndexOutOfBounsException is raised.

The word "use" being in my stopword list, the query
below fails :

		QueryParser parser = new QueryParser("contents",
specific_analyzer_with_stopword) ; 
		Query query = parser.parse("use AND case");

java.lang.ArrayIndexOutOfBoundsException: -1 < 0
	at java.util.Vector.elementAt(Vector.java:437)
	at
org.apache.lucene.queryParser.QueryParser.addClause(QueryParser.java:161)
	at
org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:463)
	at
org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:113)
	at
mypackage.test.TestLuceneSearch.search(TestLuceneSearch.java:224)

2- On the other hand, when I permute the stop word
after the 'AND' operator as : "case AND use", the
query works well.

Does anybody go through this kind of issue  before ?
Is this a bug or is it some limitation, where lucene
required very strict rules on well formed query string
?
Thanks.

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

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


Re: Query with stop word + AND operand : java.lang.ArrayIndexOutOfBoundsException

Posted by Otis Gospodnetic <ot...@yahoo.com>.
I believe this is a known bug (see the 'Bugs' link on Lucene home
page).

Otis

--- Ren� Ferr�ro <re...@yahoo.fr> wrote:
> Hi,
> 1- If a stop word is the first term of AND operator,
> ArrayIndexOutOfBounsException is raised.
> 
> The word "use" being in my stopword list, the query
> below fails :
> 
> 		QueryParser parser = new QueryParser("contents",
> specific_analyzer_with_stopword) ; 
> 		Query query = parser.parse("use AND case");
> 
> java.lang.ArrayIndexOutOfBoundsException: -1 < 0
> 	at java.util.Vector.elementAt(Vector.java:437)
> 	at
>
org.apache.lucene.queryParser.QueryParser.addClause(QueryParser.java:161)
> 	at
> org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:463)
> 	at
> org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:113)
> 	at
> mypackage.test.TestLuceneSearch.search(TestLuceneSearch.java:224)
> 
> 2- On the other hand, when I permute the stop word
> after the 'AND' operator as : "case AND use", the
> query works well.
> 
> Does anybody go through this kind of issue  before ?
> Is this a bug or is it some limitation, where lucene
> required very strict rules on well formed query string
> ?
> Thanks.
> 
> ___________________________________________________________
> Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran�ais !
> Yahoo! Mail : http://fr.mail.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

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