lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Dutcher <kdutc...@gmail.com>
Subject Too many required clauses for a BooleanQuery
Date Wed, 08 Feb 2006 23:52:22 GMT
Hey Everyone,

I'm running into the "More than 32 required/prohibited clauses in query"
exception when running a query. I thought I understood the problem but the
following two scenarios confuse me.

1st - No Error
33 required clauses plus additional clauses that are left off b/c they
are the same as the second scenario
=============================================
(categorization:10102617 AND categorization:10102621 AND
categorization:10102625 AND categorization:10102629 AND
categorization:10102633 AND categorization:10102637 AND
categorization:10102641 AND categorization:10102645 AND
categorization:10102649 AND categorization:10102653 AND
categorization:10102657 AND categorization:10102661 AND
categorization:10102665 AND categorization:10102669 AND
categorization:10102673 AND categorization:10102677 AND
categorization:10102681 AND categorization:10102685 AND
categorization:10102689 AND categorization:10102693 AND
categorization:10102697 AND categorization:10102701 AND
categorization:10102705 AND categorization:10102709 AND
categorization:10102713 AND categorization:10102717 AND
categorization:10102721 AND categorization:10102725 AND
categorization:10102729 AND categorization:10102733 AND
categorization:10102737 AND categorization:10102741 AND
categorization:10102745) AND ...

2nd - Error
The 33 required clauses above with the addition of a required
clause that is 3 OR'd clauses
============================================
((categorization:10102405 OR categorization:10102409 OR
categorization:10102413) AND categorization:10102617 AND
categorization:10102621 AND categorization:10102625 AND
categorization:10102629 AND categorization:10102633 AND
categorization:10102637 AND categorization:10102641 AND
categorization:10102645 AND categorization:10102649 AND
categorization:10102653 AND categorization:10102657 AND
categorization:10102661 AND categorization:10102665 AND
categorization:10102669 AND categorization:10102673 AND
categorization:10102677 AND categorization:10102681 AND
categorization:10102685 AND categorization:10102689 AND
categorization:10102693 AND categorization:10102697 AND
categorization:10102701 AND categorization:10102705 AND
categorization:10102709 AND categorization:10102713 AND
categorization:10102717 AND categorization:10102721 AND
categorization:10102725 AND categorization:10102729 AND
categorization:10102733 AND categorization:10102737 AND
categorization:10102741 AND categorization:10102745) AND ...

I can add additional required clauses to the 1st scenario without any
problems. So why am I seeing the error in the second scenario and not the
first? After discovering the error, I expected to see it in the first
scenario also. Is there anyway around this error?

As a side note, it is very unlikely that this will be encountered in the
real world, but b/c we are dealing with content categorization it is still
possible.

Thanks in advance,

Kevin

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