Hi René,

Since you're constructing the filter from a WildcardQuery or a PrefixQuery, 
both of which use a BooleanQuery to hold a TermQuery for each matching index 
term, you'll need to increase the number of clauses a BooleanQuery is allowed 
to hold, by calling static method BooleanQuery.setMaxClauseCount():

<http://lucene.apache.org/java/2_3_2/api/org/apache/lucene/search/BooleanQuery.html#setMaxClauseCount(int)>

Or, to avoid the clause limit issue altogether, you could use a PrefixFilter 
instead of a QueryWrapperFilter around a {Wildcard,Prefix}Query:

<http://lucene.apache.org/java/2_3_2/api/org/apache/lucene/search/PrefixFilter.html>

Steve

On 07/30/2008 at 3:30 AM, [EMAIL PROTECTED] wrote:
> Hello,
> 
> I've filled an index with 1100 text files with the names
> "monisys1" to "monisys1100".
> 
> If I start a WildcardQuery
>        WildcardQuery query = new WildcardQuery(new
>        Term("fileId","monisys*")); Hits hits = searcher.search(query);
> I get a "Too many clauses" exception, like I expected.
> 
> But when I use a filter to avoid this exception, this
> exception still occurs.
>       ConstantScoreQuery scoreQuery = new
> ConstantScoreQuery(new QueryWrapperFilter(new
> WildcardQuery(new Term("fileId","monisys*"))));
>       Hits hits = searcher.search(scoreQuery);
> 
> Did I miss something?
> 
> Thank you.
> 
> --René
> 
> --
> Psssst! Schon vom neuen GMX MultiMessenger gehört?
> Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to