lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@lucene.com>
Subject Re: Caching filter wrapper (was Re: RE : DateFilter.Before/After)
Date Mon, 15 Sep 2003 17:13:45 GMT
Bruce Ritchie wrote:
> I think it would depend on whether the cache key's are independant of 
> IndexReaders (i.e. an implementation that's not implemented in the same 
> manner as the QueryFilter by using an IndexReader as a cache key (or 
> part thereof). This is because I open multiple IndexReaders against a 
> single index which would cause (false) cache misses.

Why do you open multiple IndexReaders against a single index? 
Ordinarily I would only expect an application to open a new index reader 
when the index has changed, or in order to do deletions.  In both of 
these cases, the cache would work correctly.

Note that an open index reader uses much more memory than another bit 
vector in a cache will.  It caches a byte per document for each field 
you've searched, plus 1/128th of all the terms in the index.  So, e.g., 
the cached bit vectors could become dominant if you use more than eight 
caches and only search a single field.

Doug


Mime
View raw message