lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sol myr <>
Subject Re: Newbie question: optimized files?
Date Tue, 11 Jan 2011 06:46:58 GMT

Continuing my question - I now suspect a bug in Lucene 3.0.3, because I ran the test with
Lucene 3.0.0 and it worked okay (no junk files)... could anyone please confirm?

--- On Mon, 1/10/11, sol myr <> wrote:

From: sol myr <>
Subject: Newbie question: optimized files?
Date: Monday, January 10, 2011, 9:56 AM


I'm new to Lucene (using 3.0.3), and just started to check out the behavior of the 'optimize()'
method (which is quite important for our application).
Could it be that 'optimize' cancels out the 'compoundFile' mode? Or am I doing something wrong?

Here's my test: I create an indexWriter with compoundFile=true, then perform some writes+commits
(which generates several 'cfs' files).
Then I call 'optimize()'... I expected this to yield a single optimized 'cfs' file, but instead
I get lots of different files - 'fdt', 'fdx', 'fnm' etc...

The detailed code:
// Create indexWriter with 'compoundfile=true':
Version version=Version.LUCENE_30;
Directory dir = File("c:/luceneTemp"));
Analyzer analyzer = new StandardAnalyzer(version);
IndexWriter writer = new IndexWriter(
         dir, analyzer, true, IndexWriter.MaxFieldLength.LIMITED);

// Perform some writes + commits.
// This yields several 'cfs' files as expected:

Thread.sleep(20000);  // give myself time to see the generated 'cfs' files

// Optimize - why does it yield lots of separate files ('fdt', 'fdx', etc)?



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message