Aw: RE: 回复: Never close IndexWriter/Reader?

2014-05-06 Thread Sascha Janz
 java-user@lucene.apache.org Betreff: RE: 回复: Never close IndexWriter/Reader? Hi, I would not do that. Reopening the NRT reader is not as expensive as committing (which also fsyncs), but the current indexed data has to be written to a new segment on disk (called flush in Lucene world). So reopenening periodical

Re: Never close IndexWriter/Reader?

2014-05-04 Thread Denis Bazhenov
Hello, Sascha. That's right. You should close IndexWriter instance only when the applications itself is stopping. To make documents visible to newly created IndexReader instances commit() call is enough. On May 4, 2014, at 2:46 AM, Sascha Janz wrote: > Hi, > > > > We use lucene 4.6, our ap

RE: 回复: Never close IndexWriter/Reader?

2014-05-04 Thread Uwe Schindler
> Sent: Sunday, May 04, 2014 6:05 AM > To: java-user > Subject: 回复: Never close IndexWriter/Reader? > > Hi, Mike. Instead of periodically reopen NRT reader , I open/close it for > every > search query , will this result in performance issue? > > > Thanks > lubi

?????? Never close IndexWriter/Reader?

2014-05-03 Thread 308181687
ot;Lucene Users"; ????: Re: Never close IndexWriter/Reader? Just leave your IW open forever and periodically reopen your NRT reader. Be sure you close your old NRT reader after opening a new one; SearcherManager makes this easy when multiple threads are using the readers. Committing every

Re: Never close IndexWriter/Reader?

2014-05-03 Thread Michael McCandless
Just leave your IW open forever and periodically reopen your NRT reader. Be sure you close your old NRT reader after opening a new one; SearcherManager makes this easy when multiple threads are using the readers. Committing every 200 docs seems quite frequent: commit is very costly, and it's only

Never close IndexWriter/Reader?

2014-05-03 Thread Sascha Janz
Hi, We use lucene 4.6, our application receives continuously new documents. Mostly emails. We need the update near real time, so we open the IndexReader with Directory.open and IndexWriter. Periodically we do a commit, e.g. every 200 documents. We used to close the IndexWriter on commi