java.lang.Object
org.apache.lucene.index.IndexReader
org.apache.lucene.index.LeafReader
org.apache.lucene.index.FilterLeafReader
org.elasticsearch.common.lucene.index.SequentialStoredFieldsLeafReader
org.elasticsearch.xpack.core.security.authz.accesscontrol.FieldSubsetReader
All Implemented Interfaces:
Closeable, AutoCloseable

public final class FieldSubsetReader extends SequentialStoredFieldsLeafReader
A FilterLeafReader that exposes only a subset of fields from the underlying wrapped reader.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.lucene.index.FilterLeafReader

    org.apache.lucene.index.FilterLeafReader.FilterFields, org.apache.lucene.index.FilterLeafReader.FilterPostingsEnum, org.apache.lucene.index.FilterLeafReader.FilterTerms, org.apache.lucene.index.FilterLeafReader.FilterTermsEnum

    Nested classes/interfaces inherited from class org.apache.lucene.index.IndexReader

    org.apache.lucene.index.IndexReader.CacheHelper, org.apache.lucene.index.IndexReader.CacheKey, org.apache.lucene.index.IndexReader.ClosedListener
  • Field Summary

    Fields inherited from class org.apache.lucene.index.FilterLeafReader

    in
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.apache.lucene.codecs.StoredFieldsReader
    doGetSequentialStoredFieldsReader(org.apache.lucene.codecs.StoredFieldsReader reader)
     
    org.apache.lucene.index.BinaryDocValues
     
    org.apache.lucene.index.ByteVectorValues
     
    org.apache.lucene.index.IndexReader.CacheHelper
     
    org.apache.lucene.index.FieldInfos
     
    org.apache.lucene.index.FloatVectorValues
     
    org.apache.lucene.index.NumericDocValues
     
    org.apache.lucene.index.NumericDocValues
     
    org.apache.lucene.index.PointValues
     
    org.apache.lucene.index.IndexReader.CacheHelper
     
    org.apache.lucene.index.SortedDocValues
     
    org.apache.lucene.index.SortedNumericDocValues
     
    org.apache.lucene.index.SortedSetDocValues
     
    void
    searchNearestVectors(String field, byte[] target, org.apache.lucene.search.KnnCollector collector, org.apache.lucene.util.Bits acceptDocs)
     
    void
    searchNearestVectors(String field, float[] target, org.apache.lucene.search.KnnCollector collector, org.apache.lucene.util.Bits acceptDocs)
     
    org.apache.lucene.index.StoredFields
     
    org.apache.lucene.index.Terms
    terms(String field)
     
    org.apache.lucene.index.TermVectors
     
    static org.apache.lucene.index.DirectoryReader
    wrap(org.apache.lucene.index.DirectoryReader in, org.apache.lucene.util.automaton.CharacterRunAutomaton filter)
    Wraps a provided DirectoryReader, exposing a subset of fields.

    Methods inherited from class org.elasticsearch.common.lucene.index.SequentialStoredFieldsLeafReader

    getSequentialStoredFieldsReader

    Methods inherited from class org.apache.lucene.index.FilterLeafReader

    checkIntegrity, doClose, getDelegate, getDocValuesSkipper, getLiveDocs, getMetaData, maxDoc, numDocs, toString, unwrap

    Methods inherited from class org.apache.lucene.index.LeafReader

    docFreq, getContext, getDocCount, getSumDocFreq, getSumTotalTermFreq, postings, postings, searchNearestVectors, searchNearestVectors, totalTermFreq

    Methods inherited from class org.apache.lucene.index.IndexReader

    close, decRef, ensureOpen, equals, getRefCount, hasDeletions, hashCode, incRef, leaves, notifyReaderClosedListeners, numDeletedDocs, registerParentReader, tryIncRef

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Method Details

    • wrap

      public static org.apache.lucene.index.DirectoryReader wrap(org.apache.lucene.index.DirectoryReader in, org.apache.lucene.util.automaton.CharacterRunAutomaton filter) throws IOException
      Wraps a provided DirectoryReader, exposing a subset of fields.

      Note that for convenience, the returned reader can be used normally (e.g. passed to DirectoryReader.openIfChanged(DirectoryReader)) and so on.

      Parameters:
      in - reader to filter
      filter - fields to filter.
      Throws:
      IOException
    • getFieldInfos

      public org.apache.lucene.index.FieldInfos getFieldInfos()
      Overrides:
      getFieldInfos in class org.apache.lucene.index.FilterLeafReader
    • termVectors

      public org.apache.lucene.index.TermVectors termVectors() throws IOException
      Overrides:
      termVectors in class org.apache.lucene.index.FilterLeafReader
      Throws:
      IOException
    • storedFields

      public org.apache.lucene.index.StoredFields storedFields() throws IOException
      Overrides:
      storedFields in class org.apache.lucene.index.FilterLeafReader
      Throws:
      IOException
    • doGetSequentialStoredFieldsReader

      protected org.apache.lucene.codecs.StoredFieldsReader doGetSequentialStoredFieldsReader(org.apache.lucene.codecs.StoredFieldsReader reader)
      Specified by:
      doGetSequentialStoredFieldsReader in class SequentialStoredFieldsLeafReader
    • terms

      public org.apache.lucene.index.Terms terms(String field) throws IOException
      Overrides:
      terms in class org.apache.lucene.index.FilterLeafReader
      Throws:
      IOException
    • getNumericDocValues

      public org.apache.lucene.index.NumericDocValues getNumericDocValues(String field) throws IOException
      Overrides:
      getNumericDocValues in class org.apache.lucene.index.FilterLeafReader
      Throws:
      IOException
    • getBinaryDocValues

      public org.apache.lucene.index.BinaryDocValues getBinaryDocValues(String field) throws IOException
      Overrides:
      getBinaryDocValues in class org.apache.lucene.index.FilterLeafReader
      Throws:
      IOException
    • getSortedDocValues

      public org.apache.lucene.index.SortedDocValues getSortedDocValues(String field) throws IOException
      Overrides:
      getSortedDocValues in class org.apache.lucene.index.FilterLeafReader
      Throws:
      IOException
    • getSortedNumericDocValues

      public org.apache.lucene.index.SortedNumericDocValues getSortedNumericDocValues(String field) throws IOException
      Overrides:
      getSortedNumericDocValues in class org.apache.lucene.index.FilterLeafReader
      Throws:
      IOException
    • getSortedSetDocValues

      public org.apache.lucene.index.SortedSetDocValues getSortedSetDocValues(String field) throws IOException
      Overrides:
      getSortedSetDocValues in class org.apache.lucene.index.FilterLeafReader
      Throws:
      IOException
    • getNormValues

      public org.apache.lucene.index.NumericDocValues getNormValues(String field) throws IOException
      Overrides:
      getNormValues in class org.apache.lucene.index.FilterLeafReader
      Throws:
      IOException
    • getFloatVectorValues

      public org.apache.lucene.index.FloatVectorValues getFloatVectorValues(String field) throws IOException
      Overrides:
      getFloatVectorValues in class org.apache.lucene.index.FilterLeafReader
      Throws:
      IOException
    • searchNearestVectors

      public void searchNearestVectors(String field, float[] target, org.apache.lucene.search.KnnCollector collector, org.apache.lucene.util.Bits acceptDocs) throws IOException
      Overrides:
      searchNearestVectors in class org.apache.lucene.index.FilterLeafReader
      Throws:
      IOException
    • getByteVectorValues

      public org.apache.lucene.index.ByteVectorValues getByteVectorValues(String field) throws IOException
      Overrides:
      getByteVectorValues in class org.apache.lucene.index.FilterLeafReader
      Throws:
      IOException
    • searchNearestVectors

      public void searchNearestVectors(String field, byte[] target, org.apache.lucene.search.KnnCollector collector, org.apache.lucene.util.Bits acceptDocs) throws IOException
      Overrides:
      searchNearestVectors in class org.apache.lucene.index.FilterLeafReader
      Throws:
      IOException
    • getCoreCacheHelper

      public org.apache.lucene.index.IndexReader.CacheHelper getCoreCacheHelper()
      Specified by:
      getCoreCacheHelper in class org.apache.lucene.index.LeafReader
    • getReaderCacheHelper

      public org.apache.lucene.index.IndexReader.CacheHelper getReaderCacheHelper()
      Specified by:
      getReaderCacheHelper in class org.apache.lucene.index.IndexReader
    • getPointValues

      public org.apache.lucene.index.PointValues getPointValues(String fieldName) throws IOException
      Overrides:
      getPointValues in class org.apache.lucene.index.FilterLeafReader
      Throws:
      IOException