Home | About | Sematext search-lucene.com search-hadoop.com
 Search Lucene and all its subprojects:

Switch to Threaded View
Lucene, mail # dev - NRT and IndexSearcher performance


Copy link to this message
-
RE: NRT and IndexSearcher performance
Uwe Schindler 2010-01-20, 09:04
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". Wrapping an IndexSearcher around an IndexReader is simply creating a new Java instance, nothing more.

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: [EMAIL PROTECTED]

> -----Original Message-----
> From: jchang [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 20, 2010 2:05 AM
> To: [EMAIL PROTECTED]
> Subject: NRT and IndexSearcher performance
>
>
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------