I am not sure if is that possible. We have a set of documents with the same testId, and each set of those docs, always only have 1 of them has the frames
nested type.
So I want to do the aggression with the data, there is no issue for that but I want to somehow get the frames as well.
I can do that for
PUT test_nested_agg
{
"mappings": {
"properties": {
"testId": {"type": "keyword"},
"frames": {
"type":"nested",
"properties": {
"name": { "type": "keyword" },
"length": { "type": "long"}
}
},
/* other properties*/
}
}
}
Example of my current query
{
"query": {
"bool": {
"must": [ { "terms": { "testId": [123]}}]
}
},
"_source": [ "frames"],
"aggregations": {
"histogramTime": {
"histogram": {
"field": "timesteamp",
"interval": 10,
"order": {
"_key": "asc"
},
"min_doc_count": 0,
"extended_bounds": {
"min": 1674608461,
"max": 1674694861
}
},
"aggregations": {
"numOfIssues": {
"value_count": {
"field": "issue"
}
}
/* other aggregations*/
}
}
}
}