Module org.elasticsearch.server
Package org.elasticsearch.index.mapper
Class FallbackSyntheticSourceBlockLoader
java.lang.Object
org.elasticsearch.index.mapper.FallbackSyntheticSourceBlockLoader
- All Implemented Interfaces:
BlockLoader
Block loader for fields that use fallback synthetic source implementation.
Usually fields have doc_values or stored fields and block loaders use them directly. In some cases neither is available and we would fall back to (potentially synthetic) _source. However, in case of synthetic source, there is actually no need to construct the entire _source. We know that there is no doc_values and stored fields, and therefore we will be using fallback synthetic source. That is equivalent to just reading _ignored_source stored field directly and doing an in-place synthetic source just for this field.
See
Usually fields have doc_values or stored fields and block loaders use them directly. In some cases neither is available and we would fall back to (potentially synthetic) _source. However, in case of synthetic source, there is actually no need to construct the entire _source. We know that there is no doc_values and stored fields, and therefore we will be using fallback synthetic source. That is equivalent to just reading _ignored_source stored field directly and doing an in-place synthetic source just for this field.
See
IgnoredSourceFieldMapper.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceField-specific implementation that converts data stored in _ignored_source field to block loader values.static classReader for field types that don't parse arrays (arrays are always treated as multiple values) as opposed to field types that treat arrays as special cases (for example point).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.ConstantNullsReader, BlockLoader.Delegating, BlockLoader.Docs, BlockLoader.DoubleBuilder, BlockLoader.FloatBuilder, BlockLoader.IntBuilder, BlockLoader.LongBuilder, BlockLoader.OptionalColumnAtATimeReader, BlockLoader.RowStrideReader, BlockLoader.SingletonLongBuilder, BlockLoader.SingletonOrdinalsBuilder, BlockLoader.SortedSetOrdinalsBuilder, BlockLoader.StoredFields -
Field Summary
Fields inherited from interface org.elasticsearch.index.mapper.BlockLoader
CONSTANT_NULLS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFallbackSyntheticSourceBlockLoader(FallbackSyntheticSourceBlockLoader.Reader<?> reader, String fieldName, IgnoredSourceFieldMapper.IgnoredSourceFormat ignoredSourceFormat) -
Method Summary
Modifier and TypeMethodDescriptioncolumnAtATimeReader(org.apache.lucene.index.LeafReaderContext context) org.apache.lucene.index.SortedSetDocValuesordinals(org.apache.lucene.index.LeafReaderContext context) Load ordinals for the provided context.rowStrideReader(org.apache.lucene.index.LeafReaderContext context) splitIntoFieldPaths(String fieldName) booleanDoes this loader support loading bytes via callingBlockLoader.ordinals(org.apache.lucene.index.LeafReaderContext).Methods 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
builder, convert
-
Constructor Details
-
FallbackSyntheticSourceBlockLoader
protected FallbackSyntheticSourceBlockLoader(FallbackSyntheticSourceBlockLoader.Reader<?> reader, String fieldName, IgnoredSourceFieldMapper.IgnoredSourceFormat ignoredSourceFormat)
-
-
Method Details
-
columnAtATimeReader
public BlockLoader.ColumnAtATimeReader columnAtATimeReader(org.apache.lucene.index.LeafReaderContext context) throws IOException - Specified by:
columnAtATimeReaderin interfaceBlockLoader- Throws:
IOException
-
rowStrideReader
public BlockLoader.RowStrideReader rowStrideReader(org.apache.lucene.index.LeafReaderContext context) throws IOException - Specified by:
rowStrideReaderin interfaceBlockLoader- Throws:
IOException
-
rowStrideStoredFieldSpec
- Specified by:
rowStrideStoredFieldSpecin interfaceBlockLoader
-
supportsOrdinals
public boolean supportsOrdinals()Description copied from interface:BlockLoaderDoes this loader support loading bytes via callingBlockLoader.ordinals(org.apache.lucene.index.LeafReaderContext).- Specified by:
supportsOrdinalsin interfaceBlockLoader
-
ordinals
public org.apache.lucene.index.SortedSetDocValues ordinals(org.apache.lucene.index.LeafReaderContext context) throws IOException Description copied from interface:BlockLoaderLoad ordinals for the provided context.- Specified by:
ordinalsin interfaceBlockLoader- Throws:
IOException
-
splitIntoFieldPaths
-