Skip to content

VariableWidthHistogramAggregation is missing script field #457

Closed

Description

Java API client version

8.5.1

Java version

17

Elasticsearch Version

8.5.1

Problem description

VariableWidthHistogramAggregation is missing script field. I have alread checked ES support script field when we search histogram data like below.

GET test-index/_search
{
  "size": 0,
  "aggregations": {
    "factors": {
        "variable_width_histogram": {
            "field": "testField",
            "script": "Math.log10(_value)",
            "buckets": 100
        }
    }
  }
}

However, ES API client doesn't seem to support the script field yet.

protected static void setupVariableWidthHistogramAggregationDeserializer(
ObjectDeserializer<VariableWidthHistogramAggregation.Builder> op) {
op.add(Builder::field, JsonpDeserializer.stringDeserializer(), "field");
op.add(Builder::buckets, JsonpDeserializer.integerDeserializer(), "buckets");
op.add(Builder::shardSize, JsonpDeserializer.integerDeserializer(), "shard_size");
op.add(Builder::initialBuffer, JsonpDeserializer.integerDeserializer(), "initial_buffer");

I use the histogram API in log scale, so can this API supports script field?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Area: SpecificationRelated to the API spec used to generate client code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions