On 9/26/10, Uwe Schindler <u...@thetaphi.de> 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 > http://www.thetaphi.de > eMail: u...@thetaphi.de
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 ramWriter.close(); fsWriter.addIndexes(Directory[] {ramDir}); ramWriter = new IndexWriter(ramDir, new SimpleAnalyzer(), true); } } 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() right? thanks for your help though. :-) -- http://jacobian.web.id --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org