The documents I have stored in elasticsearch have been given a common id (cid) if they relate to the same event.
Is there a way within kibana to treat these multiple documents as a single one?
For example I want to find the cardinality of a field. Each set of documents with the same 'cid' should only count once.
{
"f": "foo",
"cid": 1,
...
}
{
"f": "foo",
"cid": 1,
...
}
{
"f": "foo",
"cid": 2,
...
}
This should give the cardinality of the term foo to be 2.
When I try to create a visualization using the cid as a bucket, then the field I want to visualize as a sub-bucket, I just get visualizations on the cids, then within that the other field.
I am not sure if kibana is appropriate for this, or I would be better passing the index back through a script to merge these documents into one (seems a bit messy).
Any ideas appreciated.
Brett