Skip to content

Commit 30ced99

Browse files
committed
Relax (again) the check in blockLoader in RangeFieldMapper, since it seem to fail in practice
1 parent e48b8c8 commit 30ced99

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,8 @@ public BlockLoader blockLoader(BlockLoaderContext blContext) {
374374
if (rangeType != RangeType.DATE) {
375375
throw new UnsupportedOperationException("loading blocks is only supported for date fields");
376376
}
377-
if (blContext.fieldExtractPreference() == DOC_VALUES && hasDocValues()) {
377+
// TODO: do we need this additional check?
378+
if (/* blContext.fieldExtractPreference() == DOC_VALUES && */ hasDocValues()) {
378379
return new DateRangeDocValuesLoader(name());
379380
}
380381
throw new IllegalStateException("Cannot load blocks without doc values");

0 commit comments

Comments
 (0)