Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Aggregation bug #904

Open
chenny opened this issue Jun 30, 2023 · 0 comments
Open

Aggregation bug #904

chenny opened this issue Jun 30, 2023 · 0 comments

Comments

@chenny
Copy link

chenny commented Jun 30, 2023

=============�dada source:===================
curl http://localhost:4080/api/_bulk -i -u admin:Complexpass#123 --data-binary "@olympics.ndjson"
HTTP/1.1 100 Continue

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Zinc: v0.4.7-1-g4c2442f
Date: Fri, 30 Jun 2023 07:01:03 GMT
Content-Length: 53

{"message":"bulk data inserted","record_count":36935}

swagger api debug:
{ "search_type": "match", "query": { "term": "Ice Hockey" }, "sort_fields": ["-@timestamp"], "from": 0, "max_results": 20, "aggs": { "Medal": { "agg_type": "term", "field": "Medal", "size": 10 }, "Year": { "agg_type": "range", "field": "Year", "size": 10, "ranges": [ {"from": 1900, "to": 1920}, {"from": 1921, "to": 1950}, {"from": 1951, "to": 2000}, {"from": 2000, "to": 2021} ] }, "@timestamp": { "agg_type": "date_range", "field": "@timestamp", "size": 10, "date_ranges": [ { "from": "2020-01-21T09:22:50.604Z", "to": "2021-01-21T09:22:50.604Z" }, { "from": "2021-01-22T09:22:50.604Z", "to": "2023-01-21T09:22:50.604Z" } ] }, "max_Year": { "agg_type": "max", "field": "Year" }, "min_Year": { "agg_type": "min", "field": "Year" }, "avg_Year": { "agg_type": "avg", "field": "Year" }, "weighted_avg_Year": { "agg_type": "weighted_avg", "field": "Year", "weight_field": "Year" }, "sum_Year": { "agg_type": "sum", "field": "Year" }, "count_Sport": { "agg_type": "count", "field": "Sport" } } }
Response body:

image
I expect the return result to be similar to the above doc

image

What is the problem, my data source and request parameters are consistent with the document?
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant