Module org.elasticsearch.xcore
Class FieldSubsetReader
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
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.FilterTermsEnumNested 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 TypeMethodDescriptionvoiddocument(int docID, org.apache.lucene.index.StoredFieldVisitor visitor) protected org.apache.lucene.codecs.StoredFieldsReaderdoGetSequentialStoredFieldsReader(org.apache.lucene.codecs.StoredFieldsReader reader) org.apache.lucene.index.BinaryDocValuesgetBinaryDocValues(String field) org.apache.lucene.index.ByteVectorValuesgetByteVectorValues(String field) org.apache.lucene.index.IndexReader.CacheHelperorg.apache.lucene.index.FieldInfosorg.apache.lucene.index.FloatVectorValuesgetFloatVectorValues(String field) org.apache.lucene.index.NumericDocValuesgetNormValues(String field) org.apache.lucene.index.NumericDocValuesgetNumericDocValues(String field) org.apache.lucene.index.PointValuesgetPointValues(String fieldName) org.apache.lucene.index.IndexReader.CacheHelperorg.apache.lucene.index.SortedDocValuesgetSortedDocValues(String field) org.apache.lucene.index.SortedNumericDocValuesgetSortedNumericDocValues(String field) org.apache.lucene.index.SortedSetDocValuesgetSortedSetDocValues(String field) org.apache.lucene.index.FieldsgetTermVectors(int docID) voidsearchNearestVectors(String field, byte[] target, org.apache.lucene.search.KnnCollector collector, org.apache.lucene.util.Bits acceptDocs) voidsearchNearestVectors(String field, float[] target, org.apache.lucene.search.KnnCollector collector, org.apache.lucene.util.Bits acceptDocs) org.apache.lucene.index.StoredFieldsorg.apache.lucene.index.Termsorg.apache.lucene.index.TermVectorsstatic org.apache.lucene.index.DirectoryReaderwrap(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
getSequentialStoredFieldsReaderMethods inherited from class org.apache.lucene.index.FilterLeafReader
checkIntegrity, doClose, getDelegate, getLiveDocs, getMetaData, maxDoc, numDocs, toString, unwrapMethods inherited from class org.apache.lucene.index.LeafReader
docFreq, getContext, getDocCount, getSumDocFreq, getSumTotalTermFreq, postings, postings, searchNearestVectors, searchNearestVectors, totalTermFreqMethods inherited from class org.apache.lucene.index.IndexReader
close, decRef, document, document, ensureOpen, equals, getRefCount, getTermVector, hasDeletions, hashCode, incRef, leaves, notifyReaderClosedListeners, numDeletedDocs, registerParentReader, tryIncRef
-
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 filterfilter- fields to filter.- Throws:
IOException
-
getFieldInfos
public org.apache.lucene.index.FieldInfos getFieldInfos()- Overrides:
getFieldInfosin classorg.apache.lucene.index.FilterLeafReader
-
getTermVectors
- Overrides:
getTermVectorsin classorg.apache.lucene.index.FilterLeafReader- Throws:
IOException
-
termVectors
- Overrides:
termVectorsin classorg.apache.lucene.index.FilterLeafReader- Throws:
IOException
-
storedFields
- Overrides:
storedFieldsin classorg.apache.lucene.index.FilterLeafReader- Throws:
IOException
-
document
public void document(int docID, org.apache.lucene.index.StoredFieldVisitor visitor) throws IOException - Overrides:
documentin classorg.apache.lucene.index.FilterLeafReader- Throws:
IOException
-
doGetSequentialStoredFieldsReader
protected org.apache.lucene.codecs.StoredFieldsReader doGetSequentialStoredFieldsReader(org.apache.lucene.codecs.StoredFieldsReader reader) - Specified by:
doGetSequentialStoredFieldsReaderin classSequentialStoredFieldsLeafReader
-
terms
- Overrides:
termsin classorg.apache.lucene.index.FilterLeafReader- Throws:
IOException
-
getNumericDocValues
public org.apache.lucene.index.NumericDocValues getNumericDocValues(String field) throws IOException - Overrides:
getNumericDocValuesin classorg.apache.lucene.index.FilterLeafReader- Throws:
IOException
-
getBinaryDocValues
- Overrides:
getBinaryDocValuesin classorg.apache.lucene.index.FilterLeafReader- Throws:
IOException
-
getSortedDocValues
- Overrides:
getSortedDocValuesin classorg.apache.lucene.index.FilterLeafReader- Throws:
IOException
-
getSortedNumericDocValues
public org.apache.lucene.index.SortedNumericDocValues getSortedNumericDocValues(String field) throws IOException - Overrides:
getSortedNumericDocValuesin classorg.apache.lucene.index.FilterLeafReader- Throws:
IOException
-
getSortedSetDocValues
public org.apache.lucene.index.SortedSetDocValues getSortedSetDocValues(String field) throws IOException - Overrides:
getSortedSetDocValuesin classorg.apache.lucene.index.FilterLeafReader- Throws:
IOException
-
getNormValues
- Overrides:
getNormValuesin classorg.apache.lucene.index.FilterLeafReader- Throws:
IOException
-
getFloatVectorValues
public org.apache.lucene.index.FloatVectorValues getFloatVectorValues(String field) throws IOException - Overrides:
getFloatVectorValuesin classorg.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:
searchNearestVectorsin classorg.apache.lucene.index.FilterLeafReader- Throws:
IOException
-
getByteVectorValues
public org.apache.lucene.index.ByteVectorValues getByteVectorValues(String field) throws IOException - Overrides:
getByteVectorValuesin classorg.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:
searchNearestVectorsin classorg.apache.lucene.index.FilterLeafReader- Throws:
IOException
-
getCoreCacheHelper
public org.apache.lucene.index.IndexReader.CacheHelper getCoreCacheHelper()- Specified by:
getCoreCacheHelperin classorg.apache.lucene.index.LeafReader
-
getReaderCacheHelper
public org.apache.lucene.index.IndexReader.CacheHelper getReaderCacheHelper()- Specified by:
getReaderCacheHelperin classorg.apache.lucene.index.IndexReader
-
getPointValues
- Overrides:
getPointValuesin classorg.apache.lucene.index.FilterLeafReader- Throws:
IOException
-