>
> Is there are particular reason why CachingWrapperFilter caches per
> IndexReader
> and not per IndexReader.directory()? If there are multiple
> IndexSearcher/IndexReader instances (and only one Directory) cache will be
> built and held in memory redundantly. I don't see any sense in doing so
> (?).
>

It's very simple... when you are talking about cache here you are talking
about "In Memory Cache" and not "Persistent" cache. IndexReader is something
which closely resembles in-memory snapshot of indices, while directory()
refers to persisted indices. With this analogy the caching solution fits
best at IndexReader level.

Over that, same directory can be opened by multiple processes (not threads)
- to complicate the situation these processes can be running on distributed
machines. It would require lot of IPCs and very complicated solution to
provide caching at directory level.

Regards,
Shailendra

On Jan 1, 2008 11:56 PM, Grant Ingersoll <[EMAIL PROTECTED]> wrote:

> My guess would be b/c best practice is usually to only have one Reader/
> Searcher per Directory, but I don't know if that is the real reason.
> Most discussions/testing I have seen indicate a single Reader/Searcher
> performs best.
>
> -Grant
>
> On Jan 1, 2008, at 11:57 AM, Timo Nentwig wrote:
>
> > Hi!
> >
> > Is there are particular reason why CachingWrapperFilter caches per
> > IndexReader
> > and not per IndexReader.directory()? If there are multiple
> > IndexSearcher/IndexReader instances (and only one Directory) cache
> > will be
> > built and held in memory redundantly. I don't see any sense in doing
> > so (?).
> >
> > Thanks for hints...
> > Timo
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> --------------------------
> Grant Ingersoll
> http://lucene.grantingersoll.com
> http://www.lucenebootcamp.com
>
> Lucene Helpful Hints:
> http://wiki.apache.org/lucene-java/BasicsOfPerformance
> http://wiki.apache.org/lucene-java/LuceneFAQ
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Shailendra Sharma
+91-988-011-3066

Reply via email to