You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Flávio Marim <fl...@bs2.com.br> on 2006/04/19 22:10:24 UTC

BooleanQuery$TooManyClauses

Hi there.
I am a new Lucene user and I have been searching the group archives but
couldn't solve the problem. I have just joined a project that uses Lucene.

We get an error when we issue some of our wildcard text searches.

We use the StandardAnalyzer for indexing our documents and our query is as
follows when we issue a search string of s1* for example:  (+(identity:s1*
 keywords:s1* {title:s1* {body:s1* {description:s1* searchterms:s1*
{abstract:s1* creatoremail:s1* authornameS:s1* {reviewername:s1*
metadata:s1* {authorname:s1*) +all:all)

Anyone have any ideas on how to debug this or how we can fix it?

We are using Lucene version 1.4.3 and the error appears as follows:

2006-04-06 13:43:20,928 [Servlet.Engine.Transports : 0] ERROR -
org.apache.lucene.search.BooleanQuery$TooManyClauses
        at
org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java(CompiledCode))
        at
org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java(Inlined
Compiled Code))
        at
org.apache.lucene.search.PrefixQuery.rewrite(PrefixQuery.java(Compiled Code))
        at
org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java(Compiled
Code))
        at
org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java(Compiled
Code))
        at
org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java(Inlined
Compiled Code))
        at org.apache.lucene.search.Query.weight(Query.java(Inlined
Compiled Code))
        at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java(Compiled
Code))
        at org.apache.lucene.search.Hits.getMoreDocs(Hits.java(Compiled
Code))
        at org.apache.lucene.search.Hits.<init>(Hits.java(Inlined Compiled
Code))
        at org.apache.lucene.search.Searcher.search(Searcher.java(Inlined
Compiled Code))
        at org.apache.lucene.search.Searcher.search(Searcher.java(Inlined
Compiled Code))
        at
com.ibm.services.salesone.fsearch.search.FacetedSearchImpl.getFacetCountsWithText(FacetedSearchImpl.java(Compiled
Code))
  	...... <truncated to limit size of this email>

-- 
Marim

"Only reading is really difficult to learn. All the rest is written
somewhere"



-- 
Marim

"Difícil é aprender a ler. O resto está escrito."


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: BooleanQuery$TooManyClauses

Posted by Erick Erickson <er...@gmail.com>.
Be careful, especially if you have some test data that you're using to prove
things out and only later will you use the "real" (and usually much larger)
data set. There are two problems that I know of with bumping the clauses to
MAX_VALUE.

1> you can run out of memory.
2> it might take a long time. A really long time.

If either of these things happens, you may have to deal with filters and
cleverness. The guys were very kind with their explanations of wildcard
issues, see the thread titled "*I just don't get wildcards at all."

*Best
Erick*

*

Re: BooleanQuery$TooManyClauses

Posted by Flávio Marim <fl...@bs2.com.br>.
Thanks friends. The problem was solved. I used
BooleanQuery.setMaxClauseCount(Integer.MAX_VALUE) because the value was
really big and so variable that I couldn't determine a consistent top
value.

--
Marim

Supriya Kumar Shyamal disse:
> Normally the default setup for BooleanCluase count is 1024, may be your
> query produce more query than 1024, one work around is that you set the
> BooleanCluase count to more than 1024. You can do that by just invoking
> the static method
> BooleanQuery.setMaxClauseCount(2048);
>
> supriya
>
> Flávio Marim wrote:
>> Hi there.
>> I am a new Lucene user and I have been searching the group archives but
>> couldn't solve the problem. I have just joined a project that uses
>> Lucene.
>>
>> We get an error when we issue some of our wildcard text searches.
>>
>> We use the StandardAnalyzer for indexing our documents and our query is
>> as
>> follows when we issue a search string of s1* for example:
>> (+(identity:s1*
>>  keywords:s1* {title:s1* {body:s1* {description:s1* searchterms:s1*
>> {abstract:s1* creatoremail:s1* authornameS:s1* {reviewername:s1*
>> metadata:s1* {authorname:s1*) +all:all)
>>
>> Anyone have any ideas on how to debug this or how we can fix it?
>>
>> We are using Lucene version 1.4.3 and the error appears as follows:
>>
>> 2006-04-06 13:43:20,928 [Servlet.Engine.Transports : 0] ERROR -
>> org.apache.lucene.search.BooleanQuery$TooManyClauses
>>         at
>> org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java(CompiledCode))
>>         at
>> org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java(Inlined
>> Compiled Code))
>>         at
>> org.apache.lucene.search.PrefixQuery.rewrite(PrefixQuery.java(Compiled
>> Code))
>>         at
>> org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java(Compiled
>> Code))
>>         at
>> org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java(Compiled
>> Code))
>>         at
>> org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java(Inlined
>> Compiled Code))
>>         at org.apache.lucene.search.Query.weight(Query.java(Inlined
>> Compiled Code))
>>         at
>> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java(Compiled
>> Code))
>>         at org.apache.lucene.search.Hits.getMoreDocs(Hits.java(Compiled
>> Code))
>>         at org.apache.lucene.search.Hits.<init>(Hits.java(Inlined
>> Compiled
>> Code))
>>         at
>> org.apache.lucene.search.Searcher.search(Searcher.java(Inlined
>> Compiled Code))
>>         at
>> org.apache.lucene.search.Searcher.search(Searcher.java(Inlined
>> Compiled Code))
>>         at
>> com.ibm.services.salesone.fsearch.search.FacetedSearchImpl.getFacetCountsWithText(FacetedSearchImpl.java(Compiled
>> Code))
>>   	...... <truncated to limit size of this email>
>>
>>
>
>
> --
> Mit freundlichen Grüßen / Regards
>
> Supriya Kumar Shyamal
>
> Software Developer
> tel +49 (30) 443 50 99 -22
> fax +49 (30) 443 50 99 -99
> email supriya.shyamal@artnology.com
> ___________________________
> artnology GmbH
> Milastr. 4
> 10437 Berlin
> ___________________________
>
> http://www.artnology.com
> __________________________________________________________________________
>
>  News / Aktuelle Projekte:
>  * artnology gewinnt Ausschreibung des Bundesministeriums des Innern:
>    Softwarelösung für die Verwaltung der Sammlung zeitgenössischer
>    Kunstwerke zur kulturellen Repräsentation des Bundes.
>
>  Projektreferenzen:
>  * Globaler eShop und Corporate-Site für Springer: www.springeronline.com
>  * E-Detailing-Portal für Novartis: www.interaktiv.novartis.de
>  * Service-Center-Plattform für Biogen: www.ms-life.de
>  * eCRM-System für Grünenthal: www.gruenenthal.com
>
> ___________________________________________________________________________
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: BooleanQuery$TooManyClauses

Posted by Supriya Kumar Shyamal <su...@artnology.com>.
Normally the default setup for BooleanCluase count is 1024, may be your 
query produce more query than 1024, one work around is that you set the 
BooleanCluase count to more than 1024. You can do that by just invoking 
the static method
BooleanQuery.setMaxClauseCount(2048);

supriya

Flávio Marim wrote:
> Hi there.
> I am a new Lucene user and I have been searching the group archives but
> couldn't solve the problem. I have just joined a project that uses Lucene.
>
> We get an error when we issue some of our wildcard text searches.
>
> We use the StandardAnalyzer for indexing our documents and our query is as
> follows when we issue a search string of s1* for example:  (+(identity:s1*
>  keywords:s1* {title:s1* {body:s1* {description:s1* searchterms:s1*
> {abstract:s1* creatoremail:s1* authornameS:s1* {reviewername:s1*
> metadata:s1* {authorname:s1*) +all:all)
>
> Anyone have any ideas on how to debug this or how we can fix it?
>
> We are using Lucene version 1.4.3 and the error appears as follows:
>
> 2006-04-06 13:43:20,928 [Servlet.Engine.Transports : 0] ERROR -
> org.apache.lucene.search.BooleanQuery$TooManyClauses
>         at
> org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java(CompiledCode))
>         at
> org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java(Inlined
> Compiled Code))
>         at
> org.apache.lucene.search.PrefixQuery.rewrite(PrefixQuery.java(Compiled Code))
>         at
> org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java(Compiled
> Code))
>         at
> org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java(Compiled
> Code))
>         at
> org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java(Inlined
> Compiled Code))
>         at org.apache.lucene.search.Query.weight(Query.java(Inlined
> Compiled Code))
>         at
> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java(Compiled
> Code))
>         at org.apache.lucene.search.Hits.getMoreDocs(Hits.java(Compiled
> Code))
>         at org.apache.lucene.search.Hits.<init>(Hits.java(Inlined Compiled
> Code))
>         at org.apache.lucene.search.Searcher.search(Searcher.java(Inlined
> Compiled Code))
>         at org.apache.lucene.search.Searcher.search(Searcher.java(Inlined
> Compiled Code))
>         at
> com.ibm.services.salesone.fsearch.search.FacetedSearchImpl.getFacetCountsWithText(FacetedSearchImpl.java(Compiled
> Code))
>   	...... <truncated to limit size of this email>
>
>   


-- 
Mit freundlichen Grüßen / Regards
 
Supriya Kumar Shyamal

Software Developer
tel +49 (30) 443 50 99 -22
fax +49 (30) 443 50 99 -99
email supriya.shyamal@artnology.com
___________________________
artnology GmbH
Milastr. 4
10437 Berlin
___________________________

http://www.artnology.com
__________________________________________________________________________

 News / Aktuelle Projekte:
 * artnology gewinnt Ausschreibung des Bundesministeriums des Innern:
   Softwarelösung für die Verwaltung der Sammlung zeitgenössischer
   Kunstwerke zur kulturellen Repräsentation des Bundes.

 Projektreferenzen:
 * Globaler eShop und Corporate-Site für Springer: www.springeronline.com
 * E-Detailing-Portal für Novartis: www.interaktiv.novartis.de
 * Service-Center-Plattform für Biogen: www.ms-life.de
 * eCRM-System für Grünenthal: www.gruenenthal.com

___________________________________________________________________________ 


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: BooleanQuery$TooManyClauses

Posted by Daniel Naber <lu...@danielnaber.de>.
On Mittwoch 19 April 2006 22:10, Flávio Marim wrote:

> I am a new Lucene user and I have been searching the group archives but
> couldn't solve the problem.

see
http://wiki.apache.org/jakarta-lucene/LuceneFAQ#head-06fafb5d19e786a50fb3dfb8821a6af9f37aa831

-- 
http://www.danielnaber.de

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org