Skip to content

Add pipeline aggregations to NativeSearchQuery. #1255

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
spring-projects-issues opened this issue Nov 4, 2019 · 1 comment · Fixed by #1809
Closed

Add pipeline aggregations to NativeSearchQuery. #1255

spring-projects-issues opened this issue Nov 4, 2019 · 1 comment · Fixed by #1809
Labels
in: core Issues in core support type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link

jjyyjjyy opened DATAES-682 and commented

 

"aggs": {
    "brand": {
      "terms": {
        "field": "brand"
      },
      "aggs": {
        "pv": {
          "value_count": {
            "field": "pid"
          }
        }
      }
    },
    "pvSum": {
      "sum_bucket": {
        "buckets_path": "brand>pv"
      }
    }
}

I can't find a way to implement this aggregation search, there is no addAggregation(PipelineAggregationBuilder) method in NativeSearchQueryBuilder

 


Affects: 3.2 GA (Moore)

Issue Links:

  • DATAES-957 Add PipelineAggregationBuilders to NativeSearchQuery
    ("is duplicated by")

1 votes, 2 watchers

@spring-projects-issues
Copy link
Author

sothawo commented

from duplicate issue:
NativeSearchQuery currently can handle aggregations that implement from the Elasticsearch class AggregationBuilder.

But Elasticsearch has a second aggregation class hierarchy, derived from PipelineAggregationBuilder. These aggregations currently cannot be used with NativeSearchQuery and should be added

@spring-projects-issues spring-projects-issues added type: enhancement A general enhancement in: core Issues in core support labels Dec 31, 2020
sothawo added a commit that referenced this issue May 11, 2021
@sothawo sothawo added this to the 4.3 M1 (2021.1.0) milestone May 11, 2021
@sothawo sothawo changed the title Cannot use sum_bucket pipeline aggregation [DATAES-682] Add pipeline aggregations to NativeSearchQuery. May 11, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
in: core Issues in core support type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants