Class GeoBytesRefFromLongsBlockLoader

java.lang.Object
org.elasticsearch.index.mapper.blockloader.docvalues.BlockDocValuesReader.DocValuesBlockLoader
org.elasticsearch.index.mapper.blockloader.docvalues.GeoBytesRefFromLongsBlockLoader
All Implemented Interfaces:
BlockLoader

public final class GeoBytesRefFromLongsBlockLoader extends BlockDocValuesReader.DocValuesBlockLoader
This is a GeoPoint-specific block loader that helps deal with an edge case where doc_values are available, yet FieldExtractPreference = NONE. When this happens, the BlockLoader sanity checker (see PlannerUtils.toElementType) expects a BytesRef. This implies that we need to load the value from _source. This however is very slow, especially when synthetic source is enabled. We're better off reading from doc_values and converting to BytesRef to satisfy the checker. This is what this block loader is for.