Thanks a lot Paul , for solving the problem.
I added booleanQuery.setMaxClauseCount(10000) and there was no prob
after that.

Regards,
Robin

-----Original Message-----
From: Raju, Robinson (Cognizant)
Sent: Wednesday, September 22, 2004 8:01 PM
To: 'Lucene Users List'
Subject: RE: WildCardQuery

Hi ,
        I think it doesn't have anything to do with number of characters
with a wildcard. Because 'z*' works and 'a*' does not.
Does lucene have a limitation on the number of hits fetched ?
The error that I get is

org.apache.lucene.search.BooleanQuery$TooManyClauses
at org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:79)
        at
org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:71)
        at
org.apache.lucene.search.MultiTermQuery.rewrite(MultiTermQuery.java:61)
        at
org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java:228)
        at
org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java:162)
        at org.apache.lucene.search.Query.weight(Query.java:84)
        at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:85)
        at
org.apache.lucene.search.MultiSearcherThread.run(ParallelMultiSearcher.j
ava:251)
java.lang.NullPointerException
        at
org.apache.lucene.search.MultiSearcherThread.hits(ParallelMultiSearcher.
java:281)
        at
org.apache.lucene.search.ParallelMultiSearcher.search(ParallelMultiSearc
her.java:85)
        at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:64)
        at org.apache.lucene.search.Hits.<init>(Hits.java:43)
        at org.apache.lucene.search.Searcher.search(Searcher.java:33)
        at
com.abcea.oos.search.helper.TestSearcher.search(TestSearcher.java:161)
        at
com.abcea.oos.search.helper.TestSearcher.main(TestSearcher.java:270)

-----Original Message-----
From: Raju, Robinson (Cognizant)
Sent: Tuesday, September 21, 2004 10:21 AM
To: 'Lucene Users List'
Subject: WildCardQuery

Is there a limitation in Lucene when it comes to wildcard search ?
Is it a problem if we use less than 3 characters along with a
wildcard(*).
Gives me error if I try using 45* , *34 , *3 ..etc .
Too Many Clauses Error
Doesn't happen if '?' is used instead of '*'.
The intriguing thing is , that it is not consistent . 00* doesn't fail.
Am I missing something ?

Robin

This e-mail and any files transmitted with it are for the sole use of the intended 
recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and 
destroy all copies of the original message.
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or 
copying of this email or any action taken in reliance on this e-mail is strictly
prohibited and may be unlawful.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to