Class FilterIndexReader

  • All Implemented Interfaces:
    Closeable, AutoCloseable, Cloneable

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

    Note: The default implementation of IndexReader.doOpenIfChanged() throws UnsupportedOperationException (like the base class), so it's not possible to reopen a FilterIndexReader. To reopen, you have to first reopen the underlying reader and wrap it again with the custom filter.

    • Constructor Detail

      • FilterIndexReader

        public FilterIndexReader​(IndexReader in)

        Construct a FilterIndexReader based on the specified base reader. Directory locking for delete, undeleteAll, and setNorm operations is left to the base reader.

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

        Parameters:
        in - specified base reader.