Getting empty objects in json after serialzing DateHistogram Aggregation object from SearchTemplateAsync response
See original GitHub issueNEST Version : 6.0.1 Elastic Version : 6.X
Description : I am gettting response from Elastic for my search template. However, after serialzing those response to json, I am getting empty objects for hits and aggregation (DateHistogram).
Steps to reproduce :
Getting response from elastic for below query but there are empty object in json after serialzing the response-
{
"size": 100,
"query": {
"constant_score": {
"filter": {
"bool": {
"must": [
{
"term": {
"id": "2"
}
}
]
}
}
}
},
"aggs": {
"CountHistory": {
"date_histogram": {
"field": "abc",
"interval": "60m",
"min_doc_count": 0,
"extended_bounds": {
"min": "2018-02-03",
"max": "2018-02-012"
}
}
}
}
}
NOTE : Serialzation is working fine with NEST 5.X versions.
Issue Analytics
- State:
- Created 6 years ago
- Comments:27 (14 by maintainers)
Top Results From Across the Web
"Key" and "docCount" are missing when serializing ...
I have a bucket aggregate that in v5 serializes to this: "items": ... [Getting empty objects in json after serialzing DateHistogram ...
Read more >Empty Elasticsearch aggregations being returned in the ...
im confused as to why my response object has all the data but it just isn't being returned in the http response i...
Read more >Match query for json object mongodb data returning empty ...
I want to get data of user by searching name. So I'm using aggregate method and then using match operator to achieve it....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Closing this due to inactivity and the suggested solutions are good workarounds in my opinion.
@anuragdewangan20 Just so I understand the issue correctly, could you confirm that this is what you’re doing:
MultiBucketAggregate<DateHistogramBucket>
for the Date Histogram aggregationISearchResponse<T>
back into JSON within the application for another purpose.Is that correct?