Re: NRT and IndexSearcher performance

2010-01-20 Thread Michael McCandless
+1 Mike On Wed, Jan 20, 2010 at 4:04 AM, Uwe Schindler wrote: > Separate to this discussion: > We should fix the JavaDocs of IndexSearcher, that it should explain, that > only the instances using Directory are costly. Creating a new IndexSearcher > around an IndexReader is a neglectible cost,

Re: NRT and IndexSearcher performance

2010-01-20 Thread Michael McCandless
On Tue, Jan 19, 2010 at 8:04 PM, jchang 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." As Uwe pointed out, creating an IndexSearcher from an already created IndexR

RE: NRT and IndexSearcher performance

2010-01-20 Thread Uwe Schindler
Separate to this discussion: We should fix the JavaDocs of IndexSearcher, that it should explain, that only the instances using Directory are costly. Creating a new IndexSearcher around an IndexReader is a neglectible cost, the important info is: "Do not recreate the IR for each search". Wrappin

Re: NRT and IndexSearcher performance

2010-01-19 Thread John Wang
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

Re: NRT and IndexSearcher performance

2010-01-19 Thread Jason Rutherglen
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 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