Try using 1.4.2. The change file says that ArrayIndexOutOfBoundsExceptions have been fixed in the queryparser.
On Fri, 12 Nov 2004 12:04:31 -0500, Will Allen <[EMAIL PROTECTED]> wrote: > Holy cow! This does happen! > > > > -----Original Message----- > From: Peter Pimley [mailto:[EMAIL PROTECTED] > Sent: Friday, November 12, 2004 11:52 AM > To: Lucene Users List > Subject: QueryParser: "[stopword] AND something" throws Exception > > [this is using lucene-1.4-final] > > Hello. > > I have just encountered a way to get the QueryParser to throw an > ArrayIndexOutOfBoundsException. It can be recreated with the demo > org.apache.lucene.demo.SearchFiles program. The way to trigger it is to > parse a query of the form: > > "a AND b" > > ...where 'a' is a stop word. For example, "the AND vector". It only > happens when the -first- term is a stop word. You could search for > "vector AND the" or "vector AND the AND class", and it works as you > would expect (i.e. the stop words are ignored). > > Unfortunately I am up against a deadline right now so I can't fix this > myself. I'm just going to filter out stop words before feeding them to > the query parser. I'll try to have a look at it in roughly 2 weeks time > if nobody else has solved it. > > Peter Pimley, > Semantico > > Here is the stack trace. > > java.lang.ArrayIndexOutOfBoundsException: -1 > at java.util.Vector.elementAt(Vector.java:434) > at > org.apache.lucene.queryParser.QueryParser.addClause(QueryParser.java:181) > at > org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:529) > at > org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:561) > at > org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:500) > at > org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:561) > at > org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:500) > at > org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:108) > at > org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:87) > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]