Skip to content

Commit

Permalink
Add scale to aggregation content, fix :run
Browse files Browse the repository at this point in the history
  • Loading branch information
axw committed Dec 20, 2023
1 parent 171598e commit 80732a7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions x-pack/plugin/mapper-exponential-histogram/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@ esplugin {
name 'exponential-histogram'
description 'Module for the exponential-histogram field type.'
classname 'org.elasticsearch.xpack.exponentialhistogram.ExponentialHistogramMapperPlugin'
extendedPlugins = ['x-pack-core', 'analytics']
extendedPlugins = ['x-pack-core']
}
base {
archivesName = 'x-pack-exponential-histogram'
}

dependencies {
compileOnly project(path: xpackModule('core'))
compileOnly project(path: xpackModule('analytics'))
//testImplementation project(path: ':x-pack:plugin:analytics')
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import org.elasticsearch.search.aggregations.support.ValuesSourceAggregatorFactory;
import org.elasticsearch.search.aggregations.support.ValuesSourceConfig;
import org.elasticsearch.search.aggregations.support.ValuesSourceRegistry;
import org.elasticsearch.xpack.analytics.aggregations.support.AnalyticsValuesSourceType;
import org.elasticsearch.xpack.exponentialhistogram.ExponentialHistogramValuesSourceType;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ public Object getProperty(List<String> path) {

@Override
public XContentBuilder doXContentBody(XContentBuilder builder, Params params) throws IOException {
builder.field("scale", getCurrentScale());
builder.startArray(CommonFields.BUCKETS.getPreferredName());
for (Bucket bucket : getBuckets()) {
builder.startObject()
Expand Down

0 comments on commit 80732a7

Please sign in to comment.