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.DocumentSubsetReader
All Implemented Interfaces:
Closeable, AutoCloseable

public final class DocumentSubsetReader extends SequentialStoredFieldsLeafReader
A reader that only exposes documents via getLiveDocs() that matches with the provided role query.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
     

    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.IndexReader.CacheHelper
     
    org.apache.lucene.util.Bits
     
    org.apache.lucene.index.IndexReader.CacheHelper
     
    boolean
     
    int
     
    wrap(org.apache.lucene.index.DirectoryReader in, DocumentSubsetBitsetCache bitsetCache, org.apache.lucene.search.Query roleQuery)
     

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

    getSequentialStoredFieldsReader

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

    checkIntegrity, doClose, document, getBinaryDocValues, getByteVectorValues, getDelegate, getFieldInfos, getFloatVectorValues, getMetaData, getNormValues, getNumericDocValues, getPointValues, getSortedDocValues, getSortedNumericDocValues, getSortedSetDocValues, getTermVectors, maxDoc, searchNearestVectors, searchNearestVectors, storedFields, terms, termVectors, 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, document, document, ensureOpen, equals, getRefCount, getTermVector, 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 DocumentSubsetReader.DocumentSubsetDirectoryReader wrap(org.apache.lucene.index.DirectoryReader in, DocumentSubsetBitsetCache bitsetCache, org.apache.lucene.search.Query roleQuery) throws IOException
      Throws:
      IOException
    • getLiveDocs

      public org.apache.lucene.util.Bits getLiveDocs()
      Overrides:
      getLiveDocs in class org.apache.lucene.index.FilterLeafReader
    • numDocs

      public int numDocs()
      Overrides:
      numDocs in class org.apache.lucene.index.FilterLeafReader
    • hasDeletions

      public boolean hasDeletions()
      Overrides:
      hasDeletions in class org.apache.lucene.index.IndexReader
    • 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
    • doGetSequentialStoredFieldsReader

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