Skip to content

Commit 7135ee7

Browse files
committed
Add a comment
1 parent d601e3d commit 7135ee7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

server/src/main/java/org/elasticsearch/index/mapper/GeoPointFieldMapper.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,15 @@ public BlockLoader blockLoader(BlockLoaderContext blContext) {
537537
return new BlockDocValuesReader.LongsBlockLoader(name());
538538
}
539539

540-
// _ignored_source field will only be present if there is no doc_values
540+
// There are two scenarios possible once we arrive here:
541+
//
542+
// * Stored source - we'll just use blockLoaderFromSource
543+
// * Synthetic source. However, because of the fieldExtractPreference() check above it is still possible that doc_values are
544+
// present here.
545+
// So we have two subcases:
546+
// - doc_values are enabled - _ignored_source field does not exist since we have doc_values. We will use
547+
// blockLoaderFromSource which reads "native" synthetic source.
548+
// - doc_values are disabled - we know that _ignored_source field is present and use a special block loader.
541549
if (isSyntheticSource && hasDocValues() == false) {
542550
return blockLoaderFromFallbackSyntheticSource(blContext);
543551
}

0 commit comments

Comments
 (0)