lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Elschot <>
Subject Re: wildcards and spans
Date Wed, 02 Aug 2006 16:23:30 GMT
On Wednesday 02 August 2006 17:29, Erick Erickson wrote:
> I'm back, with another flavor of wildcards. What direction would you point a
> poor boy who's project lead wants wildcard queries and spans? Here's the
> problem....
> I cannot use any of the classes that throw a "TooManyClauses" exception 
> SpanRegexQuery or SpanNearQuery with, say WildCardQuery). The corpus is big
> enough that this is guaranteed to be thrown. So, currently I'm using a
> filter for wildcard queries, populating it via WildcardTermEnum and
> TermDocs... Works like a champ. But I don't see how to combine this with
> spans...

You can try BooleanQuery.setMaxClauseCount() to  increase the max. nr. of
clauses to 100000 or so and see what happens when searching.
With enough RAM it should work nicely.

You could also use the surround query language. This allows to set
the max. nr. of clauses for a whole query instead of per BooleanQuery.

Paul Elschot

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message