lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shai Erera <ser...@gmail.com>
Subject Extending FieldCache
Date Fri, 04 Jun 2010 08:38:07 GMT
Hi

I've looked into extending FieldCache, so that I can read the values to
cache in a custom manner (not necessarily from the field's values). Just
want to confirm my understanding - it looks like if I want to do it, I'll
need to create my own FieldCache impl, and then set FieldCache.DEFAULT with
it?

Meaning, there's not much value in extending FieldCacheImpl at the moment,
as it's package private, and also what I'll need to extend are the different
<TYPE>Cache objects (such as ByteCache, DoubleCache etc.) to read the values
in a custom manner (suppose that IndexReader and field parameters are enough
at the moment), and then also tap into init() so that the right instances
are created?

FieldCache includes a lot of logic on how to reuse the cache between
IndexReaders etc. - I don't want to copy all that logic.

So first, I'd like to confirm my understanding. And if that's correct, I'd
like to make FC extensible. For now I think I can live w/ setting the
DEFAULT static member in FC and just allow easier extensions of
FieldCacheImpl. As a second round we can iterate on if and how to get rid of
the static member. Not crucial at the moment though.

Shai

Mime
View raw message