I think the question here really is the cost of creating new IndexReader instances per query.
Calling IndexWriter.getReader() for each query has shown to be expensive from our benchmark and previous discussions. -John On Tue, Jan 19, 2010 at 8:12 PM, Jason Rutherglen < jason.rutherg...@gmail.com> wrote: > J, > > The javadocs are illustrating there's no need to create new > IndexSearchers for each query. > > Jason > > On Tue, Jan 19, 2010 at 5:04 PM, jchang <jchangkihat...@gmail.com> wrote: > > > > The javadocs for IndexSearcher in Lucene 3.0.0 read: "For performance > > reasons it is recommended to open only one IndexSearcher and use it for > all > > of your searches." > > > > However, to use NRT, it seems I have to do this for every search, which > > contradicts the advice above: > > IndexSearcher myIndexSearcher = new > > IndexSearcher(myIndexWriter.getReader()); > > > > Is there any way to take advantage of NRT and not run into these > performance > > problems under heavy load? > > > > Is the advice from the javadoc above aimed more at > > IndexSearcher(org.apache.lucene.store.Directory directory)? Or is it > also > > aimed at IndexSearcher(org.apache.lucene.index.IndexReader indexReader), > > which I believe I have to use to get NRT (correct me if I am wrong)? > > -- > > View this message in context: > http://old.nabble.com/NRT-and-IndexSearcher-performance-tp27235434p27235434.html > > Sent from the Lucene - Java Developer mailing list archive at Nabble.com. > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org > > For additional commands, e-mail: java-dev-h...@lucene.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-dev-h...@lucene.apache.org > >