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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to