lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: OutOfMemoryError when using wildcard queries
Date Thu, 16 Oct 2003 00:47:43 GMT
Yes, it was implemented to limit the number of clauses in a 
BooleanQuery, which is what a WildcardQuery is rewritten to after 
enumerating all the terms matching the wildcard expression:

BooleanQuery:
	  private static int maxClauseCount = 1024;

WildcardQuerys, as you've experienced, have a potential for a major 
performance hit or worse.  Exposing QueryParser to users opens the door 
to this potential easily - although you can subclass QueryParser and 
disable WildcardQuerys if you like.

	Erik


On Wednesday, October 15, 2003, at 08:06  PM, Victor Hadianto wrote:

>> No, but the JVM does have a memory limit.  By default it's 64 megs, I
>> believe.  To increase it, use the -Xmx option when you run java.
>
> Dan & Akila,
>
> I may be wrong. But I remembered a while back there is a dicussion 
> about
> limiting the number of terms expanded using the wildcard query. I'm 
> not sure
> whether it has been implemented or not. Searching the mailing list 
> should
> give you some pointers. Then you can implemented the patch back to 1.2 
> for
> your ow need.
>
> /vh
>
>>
>> For example, to give the JVM 100 megs of ram, you would write:
>>
>> java -Xmx100m YourClassHere
>>
>> -----Original Message-----
>> From: Âkila [mailto:akilandeswari@india.adventnet.com]
>> Sent: Wednesday, October 15, 2003 9:15 AM
>> To: Lucene Users List
>> Subject: OutOfMemoryError when using wildcard queries
>>
>>
>> Hi,
>>
>> Am using Lucene 1.2 and getting  OutOfMemoryError when searching using
>> some wildcard queries.
>> Is there some provision that restricts the number of terms for 
>> wildcard
>> queries?
>>
>> Thanks,
>> Akila
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org


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


Mime
View raw message