lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yakob <>
Subject Re: flushing index
Date Sun, 26 Sep 2010 12:08:15 GMT
On 9/26/10, Uwe Schindler <> wrote:
> You should close the ramwriter before doing the addindexes call. Else you
> simply copy only *committed* changes, but there are none, as the index is
> initially empty and stays empty for an outside reader (your addindexes call
> is the outside reader) until the ramwriter is closed or committed. :-)
> -----
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> eMail:

thanks for the suggestion. but I was also asking of what source code
should I filled in this line

if (condition for flushing memory to disk has been met) { ///THIS LINE
fsWriter.addIndexes(Directory[] {ramDir});
ramWriter = new IndexWriter(ramDir, new SimpleAnalyzer(),

I mean what source code that I can put after the IF statement so that
it will force the index to be flushed?
but anyway, did I put the ramwriter.close() correctly in the above
source code? you advised me to close ramwriter before the addIndexes()

thanks for your help though. :-)

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

View raw message