Hi,
i'am using ES 5.5.0 in one index with default 5 shards. When i run query with following aggregation:
"attributes":{
"global":{
},
"aggs":{
"attributes_products":{
"filter":{
"bool":{
"must":[
some filters
]
}
},
"aggs":{
"attributes":{
"nested":{
"path":"attributes"
},
"aggs":{
"code":{
"terms":{
"field":"attributes.code",
"size":40
},
"aggs":{
"translations":{
"nested":{
"path":"attributes.translated_fields"
},
"aggs":{
"sk":{
"nested":{
"path":"attributes.translated_fields.sk"
},
"aggs":{
"value":{
"terms":{
"field":"attributes.translated_fields.sk.value"
"size":40
},
"aggs":{
"source":{
"aggs":{
"top_attributes":{
"top_hits":{
"size":1
}
},
"products":{
"reverse_nested":{
},
"aggs":{
"cardinality":{
"cardinality":{
"field":"parent_id"
}
}
}
}
},
"reverse_nested":{
"path":"attributes"
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
with some filters on index with about 5000 items in it. I end up with 3 failed shards and very inaccurate cardinality value. If i delete top_hits aggregation all 5 shards are success.
Is it problem of deep nested aggs, problem with just one index or problem with top_hits ?