Non-unique values grouped

I am trying to find a way to find all the items whose values are not unique and be able to filter them. For example I might have documents that look like this ...

{_id: 1, colour: gray}
{_id: 2, colour: gray}
{_id: 3, colour: blue}
{_id: 4, colour: blue}
{_id: 5, colour: red}

And what I would like to filter out is are all the documents with non-unique colours (1,2,3,4)

Is this possible?

Hey @Peter_Vanleeuwen, we can get rather close to what you're looking for with a Visualization configuration similar to the following:

This will show you the "buckets" with the smallest "doc_count" first, but it will include non-unique results if there aren't enough based on your bucket size.

To be able to filter out these buckets with more than one value, we'd need https://github.com/elastic/kibana/issues/4707 which is an open enhancement request. If you'd like comment or give this issue a +1, it'll help us prioritize it appropriately.

Yeah. I'm not even sure that issue solves my problem. The thing is I will have possibly hundreds of thousands of buckets. It makes it unwieldy. What I really need is a non-unique filter.

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