Re: flushing index

2010-10-11 Thread Erick Erickson
It's a good idea to start a new thread when asking a different question, see: http://people.apache.org/~hossman/#threadhijack I have to ask why you want to integrate the RAM directory. If you're using it to speed up indexing, you're probably making

Re: flushing index

2010-10-11 Thread Yakob
On 9/29/10, Erick Erickson wrote: > Nope, never used jNotify, so I don't have any code handy... > > Good luck! > Erick > so I did try JNotify but there is seems to be some bug in it that I find it hards to integrate in my lucene source code.so I had to try a looping option instead. http://stacko

Re: flushing index

2010-09-28 Thread Erick Erickson
Nope, never used jNotify, so I don't have any code handy... Good luck! Erick On Tue, Sep 28, 2010 at 9:38 AM, Yakob wrote: > On 9/28/10, Erick Erickson wrote: > > Flushing an index to disk is just an IndexWriter.commit(), there's > nothing > > really special about that... > > > > About running

Re: flushing index

2010-09-28 Thread Yakob
On 9/28/10, Erick Erickson wrote: > Flushing an index to disk is just an IndexWriter.commit(), there's nothing > really special about that... > > About running your code continuously, you have several options: > 1> schedule a recurring job to do this. On *nix systems, this is a cron job, > on Wind

Re: flushing index

2010-09-28 Thread Erick Erickson
Flushing an index to disk is just an IndexWriter.commit(), there's nothing really special about that... About running your code continuously, you have several options: 1> schedule a recurring job to do this. On *nix systems, this is a cron job, on Windows systems there's a job scheduler. 2> Just s

Re: flushing index

2010-09-27 Thread Yakob
On 9/27/10, Uwe Schindler wrote: > > > Yes. You must close before, else the addIndexes call will do nothing, as the > index looks empty for the addIndexes() call (because no committed segments > are available in the ramDir). > > I don't understand what you mean with flushing? If you are working on

RE: flushing index

2010-09-26 Thread Uwe Schindler
> 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(

Re: flushing index

2010-09-26 Thread Yakob
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

RE: flushing index

2010-09-25 Thread Uwe Schindler
. :-) - Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -Original Message- > From: Yakob [mailto:jacob...@opensuse-id.org] > Sent: Saturday, September 25, 2010 9:17 PM > To: java-user@lucene.apache.org > Subject: flushing index

flushing index

2010-09-25 Thread Yakob
leAnalyzer(), true); IndexWriter ramWriter = new IndexWriter(ramDir, new SimpleAnalyzer(), true); while (there are documents to index) { ... create Document ... ramWriter.addDocument(doc); if (condition for flushing memory to disk has been met) { ///THIS LINE FOR FLUSHING INDEX fsWriter.addIndexes