Too many clauses exception

hey…

i get this error quite regularly, what exactly dies it mean?

: Error occured at <q_prefix.c>:54
Error: exception 6 not handled: Too many clauses

am i adding to many clauses in the query statement?

Ben

On Wed, Aug 02, 2006 at 11:40:28AM +0200, Benjamin K. wrote:

hey…

i get this error quite regularly, what exactly dies it mean?

: Error occured at <q_prefix.c>:54
Error: exception 6 not handled: Too many clauses

am i adding to many clauses in the query statement?

this can happen with wild card queries, which can result in
lots of Boolean clauses, i.e. searching for A* will give a booleanquery
having a clause for every term in your index that starts with ‘A’.

You can override the default limit of 1024 by setting the
max_clause_count variable in the boolean query in question (difficult if
the query is generated by the query parser, in that case you could
override BooleanQuery#max_clause_count to return a higher value).

Jens


webit! Gesellschaft für neue Medien mbH www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer [email protected]
Schnorrstraße 76 Tel +49 351 46766 0
D-01069 Dresden Fax +49 351 46766 66

On 8/2/06, Jens K. [email protected] wrote:

this can happen with wild card queries, which can result in
lots of Boolean clauses, i.e. searching for A* will give a booleanquery
having a clause for every term in your index that starts with ‘A’.

You can override the default limit of 1024 by setting the
max_clause_count variable in the boolean query in question (difficult if
the query is generated by the query parser, in that case you could
override BooleanQuery#max_clause_count to return a higher value).

Jens

In future these queries will be rewritten to MultiTermQueries which
have much better performance than BooleanQueries. You still have the
same problem though. You’ll need to set the max_term_count. There will
be a :max_term_count parameter on the QueryParser also.

Dave