lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <>
Subject Re: searcher question
Date Wed, 30 Mar 2005 18:59:19 GMT
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:

View raw message