Unique count metric for array of fields

After aggregation I have documents with below structure in a bucket.

{ ... array: [ { ... }, { ... }, { key: value } ] }

Can I somehow apply unique count metric for key field? Thanks.

P.S

Does this limitation mean I can't do aggregation or perform metrics on key fields/values like below ?

{ ... array: [ { ... }, { ... }, { key: value } ] }

{ ... array: [ 'key1', ' key2' ] }

Unfortunately the format of your data is incompatible with Kibana's ability to run unique count metrics. Could you restructure your data so that it's not inside an array?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.