lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Elschot <>
Subject Re: Bug in the BooleanQuery optimizer? ..TooManyClauses
Date Fri, 12 Nov 2004 08:41:24 GMT
On Friday 12 November 2004 07:57, Sanyi wrote:
> > That's the point: there is no query optimizer in Lucene.
> Sorry, I'm not very much into Lucene's internal Classes, I'm just telling 
your the viewpoint of a
> user. You know my users aren't technicians, so answers like yours won't make 
them happy.
> They will only see that I randomly don't allow them to search (with the 1024 
limit). They won't
> understand why am I displaying "Please restrict your search a bit more.." 
when they've just
> searched for "dodge AND vip*" and there are only a few documents mathcing 
this criteria.
> So, is the only way to make them able to search happily by setting the max. 
clause limit to
> MaxInt?!

The problem is that there is a lot of freedom in choosing a query, but there
is a limited amount of resources available to search each query.

It is normally possible to reduce the numbers of such complaints a lot 
by imposing a minimum prefix length and eg. doubling or tripling the max. nr.
of clauses.

This reduces the freedom of the users because their queries
must be (a bit) more specific. The actual tradeoff depends on the user
requirements and the time and memory available on the server,
so the users get what they pay for.

Imposing a minimum prefix length can be done by overriding the method
in QueryParser that provides a prefix query.

Paul Elschot

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

View raw message