lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Rode <martin.r...@programmfabrik.de>
Subject Optimize, OutOfMemory + Merge
Date Mon, 05 Sep 2005 09:22:03 GMT
Hi all,

The code snipset below does NOT result in an optimized index in one of 
my test cases. As I understand, the optimized index, means that there is 
only ONE segment file in the index folder. After this code has run, I 
sometimes have 100 segment files in the directory.

When I call optimize() on the writer, most of the time I get OutOfMemory 
(even with 800MB for the JVM).

What do I do wrong?

Best,
Martin

---- code snip start -----
                // optimize index
                IndexReader[] readers = new IndexReader[1];
                readers[0] = IndexReader.open(diri);
                writer = new IndexWriter(diri+"-optimized", anal, true);
                System.out.println("Merging to new Index: 
'"+diri+"-optimized'");
                writer.addIndexes(readers);
                System.out.println("Done Merging.");
                readers[0].close();
---- code snip end ----




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


Mime
View raw message