Skip to content

Commit e582032

Browse files
authored
Revert change that would return type name in the field caps API (#90083)
Since aggregate_metric_field was presented as a double in the field caps API, we had a committed a temporary change that would treat aggregate_metric_double fields as a special case. After merging PR #87849 that exposes aggregate_metric_field with its own field type in all cases, we can revert this change.
1 parent 9b9540e commit e582032

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

server/src/main/java/org/elasticsearch/action/fieldcaps/FieldCapabilitiesFetcher.java

+1-5
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,7 @@ static Map<String, IndexFieldCapabilities> retrieveFieldCaps(
117117
if (filter.test(ft)) {
118118
IndexFieldCapabilities fieldCap = new IndexFieldCapabilities(
119119
field,
120-
// This is a nasty hack so that we expose aggregate_metric_double field,
121-
// when the index is a time series index and the field is marked as metric.
122-
// This code should be reverted once PR https://github.com/elastic/elasticsearch/pull/87849
123-
// is merged.
124-
isTimeSeriesIndex && ft.getMetricType() != null ? ft.typeName() : ft.familyTypeName(),
120+
ft.familyTypeName(),
125121
context.isMetadataField(field),
126122
ft.isSearchable(),
127123
ft.isAggregatable(),

0 commit comments

Comments
 (0)