Class FilterLeafReader

  • All Implemented Interfaces:
    Closeable, AutoCloseable
    Direct Known Subclasses:
    ExitableDirectoryReader.ExitableFilterAtomicReader

    public abstract class FilterLeafReader
    extends LeafReader
    A FilterLeafReader contains another LeafReader, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality. The class FilterLeafReader itself simply implements all abstract methods of IndexReader with versions that pass all requests to the contained index reader. Subclasses of FilterLeafReader may further override some of these methods and may also provide additional methods and fields.

    NOTE: If you override getLiveDocs(), you will likely need to override numDocs() as well and vice-versa.

    NOTE: If this FilterLeafReader does not change the content the contained reader, you could consider delegating calls to LeafReader.getCoreCacheHelper() and IndexReader.getReaderCacheHelper().

    • Field Detail

      • in

        protected final LeafReader in
        The underlying LeafReader.
    • Constructor Detail

      • FilterLeafReader

        protected FilterLeafReader​(LeafReader in)
        Construct a FilterLeafReader based on the specified base reader.

        Note that base reader is closed if this FilterLeafReader is closed.

        Parameters:
        in - specified base reader.