Skip to content

Commit 8855e23

Browse files
committed
Handle bwc
1 parent 7e2e93b commit 8855e23

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/src/main/java/org/elasticsearch/search/fetch/subphase/FetchDocValuesPhase.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ public FetchSubPhaseProcessor getProcessor(SearchContext context, SearchLookup l
8080
if (ft == null) {
8181
continue;
8282
}
83-
ValueFetcher fetcher = new DocValueFetcher(ft.docValueFormat(fieldAndFormat.format, null), lookup.doc().getForField(ft));
83+
String format = USE_DEFAULT_FORMAT.equals(fieldAndFormat.format) ? null : fieldAndFormat.format;
84+
ValueFetcher fetcher = new DocValueFetcher(ft.docValueFormat(format, null), lookup.doc().getForField(ft));
8485
fields.add(new DocValueField(fieldAndFormat.field, fetcher));
8586
}
8687

0 commit comments

Comments
 (0)