lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Is this a bug or a feature with addIndexes?
Date Tue, 07 Dec 2004 02:04:02 GMT

: [amigo@venus tmp]# time java MemoryVsDisk 1 1 100000 -r
: Docs in the RAM index: 1
: Docs in the FS index: 0
: Total time: 142 ms

I looked at the code from the article you mentioned and added the print
statements i'm guessing you added for ramWriter/fsWriter.docCount() before
and after each are closed.  I also opened the resulting indexDir with a
new IndexReader after all the writers had been closed to get it's numDocs
-- and I can confirm that the index in indexDir is in fact empty.  (using

But like i said before:  You should try closing the ramWriter before
calling fsWriter.addIndexes.  i can say with authority that it works
(because i've tried it)

The date on that article is March of 2003 -- which pre-dates the lucene
1.3 RC, so it's likely that the internals have changed a bit making
it neccessary to close ramWriter first.

Hell, it's entirely possible that the code in Otis's article never work
100% correctly ... that code never printed out the number of docs in the
final index, so it's entirely possible it was missing a few even when he
ran it.


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

View raw message