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 Balthasar Schopman <ls...@gmail.com> on 2008/07/07 18:11:55 UTC

can the boolean operators be disabeled ?

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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org