mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-25 09:28:27 +00:00
Aggregations: More consistent response format for scripted metrics aggregation
Changes the name of the field in the scripted metrics aggregation from 'aggregation' to 'value' to be more in line with the other metrics aggregations like 'avg'
This commit is contained in:
parent
dd2ef8e014
commit
8a70b115f2
@ -46,7 +46,7 @@ The response for the above aggregation:
|
||||
|
||||
"aggregations": {
|
||||
"profit": {
|
||||
"aggregation": 170
|
||||
"value": 170
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -207,7 +207,7 @@ produce the response:
|
||||
|
||||
"aggregations": {
|
||||
"profit": {
|
||||
"aggregation": 170
|
||||
"value": 170
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ public class InternalScriptedMetric extends InternalMetricsAggregation implement
|
||||
|
||||
@Override
|
||||
public XContentBuilder doXContentBody(XContentBuilder builder, Params params) throws IOException {
|
||||
return builder.field("aggregation", aggregation);
|
||||
return builder.field("value", aggregation);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user