Module org.elasticsearch.server
Package org.elasticsearch.index.mapper
Class TextFamilyFieldType.ConditionalBlockLoaderWithIgnoreField
java.lang.Object
org.elasticsearch.index.mapper.BlockLoader.ConditionalBlockLoader
org.elasticsearch.index.mapper.TextFamilyFieldType.ConditionalBlockLoaderWithIgnoreField
- All Implemented Interfaces:
BlockLoader
- Enclosing class:
TextFamilyFieldType
public static final class TextFamilyFieldType.ConditionalBlockLoaderWithIgnoreField
extends BlockLoader.ConditionalBlockLoader
A
BlockLoader.ConditionalBlockLoader that checks whether the prefer field exists in the _ignore field.
If the prefer field's term does not exist in the _ignore field, the prefer loader is used for all documents.
If the term exists in the _ignore field, the loader checks each document: if the term appears in the _ignore field for a document,
the fallback loader is used for that document; otherwise use the prefer loader.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.index.mapper.BlockLoader
BlockLoader.AggregateMetricDoubleBuilder, BlockLoader.AllReader, BlockLoader.Block, BlockLoader.BlockFactory, BlockLoader.BooleanBuilder, BlockLoader.Builder, BlockLoader.BytesRefBuilder, BlockLoader.ColumnAtATimeReader, BlockLoader.ConditionalBlockLoader, BlockLoader.ConstantNullsReader, BlockLoader.Delegating, BlockLoader.Docs, BlockLoader.DoubleBuilder, BlockLoader.ExponentialHistogramBuilder, BlockLoader.FloatBuilder, BlockLoader.IntBuilder, BlockLoader.LongBuilder, BlockLoader.OptionalColumnAtATimeReader, BlockLoader.Reader, BlockLoader.RowStrideReader, BlockLoader.SingletonBytesRefBuilder, BlockLoader.SingletonDoubleBuilder, BlockLoader.SingletonIntBuilder, BlockLoader.SingletonLongBuilder, BlockLoader.SingletonOrdinalsBuilder, BlockLoader.SortedSetOrdinalsBuilder, BlockLoader.StoredFields, BlockLoader.TDigestBuilder -
Field Summary
Fields inherited from interface org.elasticsearch.index.mapper.BlockLoader
CONSTANT_NULLS -
Constructor Summary
ConstructorsConstructorDescriptionConditionalBlockLoaderWithIgnoreField(String preferField, BlockLoader preferLoader, BlockLoader fallbackLoader) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanUsePreferLoaderForDoc(int docId) Whether we can use the prefer loader for the given doc ID.protected booleancanUsePreferLoaderForLeaf(org.apache.lucene.index.LeafReaderContext context) Determines whether the preferred loader can be used for all documents in the given leaf context.Methods inherited from class org.elasticsearch.index.mapper.BlockLoader.ConditionalBlockLoader
builder, columnAtATimeReader, ordinals, rowStrideReader, rowStrideStoredFieldSpec, supportsOrdinalsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.index.mapper.BlockLoader
convert
-
Constructor Details
-
ConditionalBlockLoaderWithIgnoreField
public ConditionalBlockLoaderWithIgnoreField(String preferField, BlockLoader preferLoader, BlockLoader fallbackLoader)
-
-
Method Details
-
canUsePreferLoaderForLeaf
protected boolean canUsePreferLoaderForLeaf(org.apache.lucene.index.LeafReaderContext context) throws IOException Description copied from class:BlockLoader.ConditionalBlockLoaderDetermines whether the preferred loader can be used for all documents in the given leaf context.- Specified by:
canUsePreferLoaderForLeafin classBlockLoader.ConditionalBlockLoader- Throws:
IOException
-
canUsePreferLoaderForDoc
Description copied from class:BlockLoader.ConditionalBlockLoaderWhether we can use the prefer loader for the given doc ID. Iftrue, then the preferred loader is used to avoid loading stored fields or source.- Specified by:
canUsePreferLoaderForDocin classBlockLoader.ConditionalBlockLoader- Throws:
IOException
-