lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <erickerick...@gmail.com>
Subject Re: ParseException: Too many boolean clauses
Date Wed, 03 May 2006 12:35:48 GMT
This is a well-known Lucene issue, having to do with the way Lucene expands
queries with ranges, etc. There is a thread in this archive titled "I just
don't get wildcards at all" that will be very helpful. See especially Chris
Hostetter's reply to some of my questions.

The short form is that I *think* that what's happening is that, by using the
StandardAnalyzer and passing a list of long user IDs, underneath the covers
you're getting one clause for each ID. The internal limit is 1024 clauses
before you get the "too many clauses" exception.

One possibility is to bump the number of clauses allowed. This is a solution
I don't recommend since, unless you are very careful, you'll get another
exception when the data or the query changes. But if you can *guarantee* the
characteristics of the data and the query, this could work well.

Otherwise, I'd recommend you look at Chris's response in the thread I
mentioned above, as well as all of the other guys' responses. And/or search
the archive for "too many clauses".

Also, consider buying a copy of "lucene in action" as it goes into detail
about this kind of issue. Don't be fooled by the thread title, although it's
about wildcards, it includes ranges, prefix queries, etc. There are a number
of queries that have this behavior, as you are finding.

Best
Erick

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message