Class FilterAtomicReader

  • All Implemented Interfaces:
    Closeable, AutoCloseable
    Direct Known Subclasses:
    SortingAtomicReader

    public class FilterAtomicReader
    extends AtomicReader
    A FilterAtomicReader contains another AtomicReader, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality. The class FilterAtomicReader itself simply implements all abstract methods of IndexReader with versions that pass all requests to the contained index reader. Subclasses of FilterAtomicReader 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 FilterAtomicReader does not change the content the contained reader, you could consider overriding IndexReader.getCoreCacheKey() so that FieldCache and CachingWrapperFilter share the same entries for this atomic reader and the wrapped one. IndexReader.getCombinedCoreAndDeletesKey() could be overridden as well if the live docs are not changed either.