AnsweredAssumed Answered

[SOLVED]TooManyclause Exception

Question asked by camillo on Apr 9, 2009
Latest reply on Apr 9, 2009 by camillo
Hi all,

If I made a search from using wildcard a TooManyclauses Exceptions occurs:


org.apache.lucene.search.BooleanQuery$TooManyClauses: maxClauseCount is set to 10000
   at org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:165)
   at org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:156)
   at org.apache.lucene.search.MultiTermQuery.rewrite(MultiTermQuery.java:63)

About this event, I read
http://wiki.apache.org/jakarta-lucene/LuceneFAQ#head-06fafb5d19e786a50fb3dfb8821a6af9f37aa831
and i putted in my code this following line:
BooleanQuery.setMaxClauseCount(30000);
but probably i put this line in a wrong place or I don't understand how can i use it.
Does anybody have yet solved this problem?

Thank you very much for your precious help!

Outcomes