I think you're off base a little. Lucene defaults to 1,024 boolean clauses as the maximum number allowed. There is an implied boolean between each term no matter what. Removing OR, AND, NOT doesn't change that in the least. That is, term1 term2 term3 is equivalent to term1 OR term2 OR term3
So removing the booleans is having no effect on the error. The fact that you have over 2,000 terms is the issue. But you can change the number by BooleanQuery.setMaxClauseCount Best Erick On Mon, Jul 7, 2008 at 12:04 PM, Balthasar Schopman <[EMAIL PROTECTED]> wrote: > Hiya, > > Is there a way to disable boolean operators in the Lucene engine? > > The reason for this question is the mystical / unexpected exception I > encounter when parsing a query containing many words. I query on a single > field with a query containing 2243 words (14.742 characters). I haven't had > this issue with smaller queries. I remove the Lucene special characters (+, > -, &&, ||, !, (, ), {, }, [, ], ^, \, ~, *, ?, :, \) and boolean operators > (AND, OR, NOT) from string before including them in a query. Then I > construct the query as follows: > Query q = new QueryParser("alldata", analyser).parse(queryString); > and call > Hits hits = searcher.search(q); > > An exception with the following message is thrown: > Cannot parse '<big string>': too many boolean clauses > > Kind regards, > Balthasar Schopman > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >