lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Omar Didi" <>
Subject RE: searcher question
Date Wed, 30 Mar 2005 20:14:48 GMT
my java heap is between 128 and 1024 MB, I have 2GB of RAM and about 10 million documents in
the index which is broken down to 6 indexes. I am using a multi-searcher to query the index.
I am using lucene1.4.3.
-----Original Message-----
From: Doug Cutting []
Sent: Wednesday, March 30, 2005 1:59 PM
Subject: Re: searcher question

Omar Didi wrote:
> I am having a large index (100GB) and when i run the following code :
> String indexLocation = servlet.getServletContext().getInitParameter( "com.lucene.index"
> logger.log( Level.INFO, "got the index location from:  " + indexLocation );
> searcher = new IndexSearcher(indexLocation);
> logger.log( Level.INFO, "we created an instance of  SearchIndex" );
> I never get to see the last message "we created an instance of  SearchIndex" and I get

> java.lang.OutOfMemoryError: Java heap space.

How big is your java heap?  How much RAM do you have on the machine? 
How many documents are in the index?  What version of Lucene?

You might try calling IndexWriter.setTermIndexInterval(512) and 
re-optimizing your index.  You might need to add and/or delete a 
document for this to have an effect if the index is already optimized. 
This method is only in the latest sources, available from subversion. 
It should dramatically reduce the amount of memory required to open the 
index.  There are other changes in the latest sources that will also 
reduce memory requirements, so you may not even need to use 


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

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

View raw message