lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig W Conway <>
Subject Re: Out of memory exception for big indexes
Date Fri, 06 Apr 2007 17:10:36 GMT
Would it be fair to say that you can expect OutOfMemory errors if you run complex queries?
ie sorts, boosts, weights...

My query looks like this:

+(pathNodeId_2976569:1^5.0 pathNodeId_2976969:1 pathNodeId_2976255:1 pathNodeId_2976571:1)
+(pathClassId:1 pathClassId:346 pathClassId:314) -id:369

My OutOfMemory error occurs like so:

java.lang.OutOfMemoryError: Java heap space
Dumping heap to java_pid4512.hprof ...
Heap dump file created [71421503 bytes in 2.640 secs]
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at org.apache.lucene.index.MultiReader.norms(


----- Original Message ----
From: Otis Gospodnetic <>
Sent: Friday, April 6, 2007 8:20:21 AM
Subject: Re: Out of memory exception for big indexes


Sorts will eat your memory, and how much they use depends on what you store in them - ints,
String, floats...
A profiler like JProfiler will tell you what's going on, who's eating your memory.

 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Simpy --  -  Tag  -  Search  -  Share

----- Original Message ----
From: Ivan Vasilev <>
Sent: Friday, April 6, 2007 7:09:38 AM
Subject: Out of memory exception for big indexes

Hi All,

I have the following problem - we have OutOfMemoryException when 
seraching on the indexes that are of size 20 - 40 GB and contain 10 - 15 
million docs.
When we make searches we perform query that match all the results but we 
DO NOT fetch all the results - we fetch 100 of them. We also make 
sorting by using the class Sort and we really need result to be sorted 
on a field that is randomly defined by the user.
So my questions are:
1) Have Lucene some restrictions on index size on which it can perform 
2) Is there some approach to estimate beforehand the RAM that will use 
Lucene for sertain query? I mean on what exactly depends this memory 
usage - on index size, on docs stored in the index, on size of this docs...
3) Is there some approach to controll the used RAM. For example when 
searching not to exceed 1GB of used memory?
4) Is there some spcial approach to proceeding with such big indexes (we 
expect in near future even 60 -80 GB indexes).

Best Regards,

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

Bored stiff? Loosen up... 
Download and play hundreds of games for free on Yahoo! Games.
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message