lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jake Mannix <jake.man...@gmail.com>
Subject Re: Help needed figuring out reason for maxClauseCount is set to 1024 error
Date Thu, 08 Oct 2009 00:34:50 GMT
On Wed, Oct 7, 2009 at 4:42 PM, mitu2009 <musicfreaque@gmail.com> wrote:

>
> Hi,
>
> I've two sets of search indexes. TestIndex (used in our test environment)
> and ProdIndex(used in PRODUCTION environment). Lucene search query:
> +date:[20090410184806 TO 20091007184806] works fine for test index but
> gives
> this error message for Prod index.
>

Oooh, this date range is going to kill your performance.  You need to use
less
precision unless you really *need* accuracy down to the second.


>
> "maxClauseCount is set to 1024"
>
> If I execute following line just before executing search query, then I do
> not get this error. BooleanQuery.SetMaxClauseCount(Int16.MaxValue);
> searcher.Search(myQuery, collector);
>
> Am I missing something here?Why am not getting this error in test index?The
> schema for two indexes are same.They only differ wrt to number of
> records/data.PROD index has got higher number of records(around 1300) than
> those in test one (around 950).
>

The reason why it is different in PROD is that your production index has
more than
a 1024 different values for your date field, while in test, your index is
small enough
so that there are less than 1024 values, so when lucene turns the range
query into
a BooleanQuery, it blows up in prod, but not in test, due to the number of
terms
it must be rewritten into.

Make sense?

  -jake

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