lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shai Erera <>
Subject The distinction between a Wrapper and a Filter
Date Thu, 15 Nov 2012 10:52:30 GMT

Several objects introduce a Filter/Wrapper, which essentially act as
delegators. E.g. FilterDirectory, FilterCodec, FilterAtomicReader, and
while not strictly a delegator - SlowCompositeReaderWrapper.

I would like to rename all the above Filters to Wrappers, e.g.
DirectoryWrapper, CodecWrapper and AtomicReaderWrapper, b/c I think that
better reflects what they do. *Delegator is less preferable, but I'm
willing to live with it too.

Then someone can write a FilterAtomicReader (extends AtomicReaderWrapper)
to e.g. return DocsEnum that filter out certain documents. I'd like that
better than having FilterAtomicReader (as wrapper) and
FilteringAtomicReader -- it's confusing to me. Also see LUCENE-2632 which
adds a FilteringCodec - at first I thought it's a duplicate of FilterCodec,
until I read the code more carefully.

Thoughts? Are there other such Filter classes that should be renamed to


View raw message