Show count excluding 2nd index values from 1st index

I have 2 Indices in Elasticsearch with below data. Need a query to visualize metric count as 2 which is documents count after excluding index2 eids from index1 eids.

index1: { "_id":1, "eid":"E1" } { "_id":2, "eid":"E2" } { "_id":3, "eid":"E3" }

index2: { "_id":1, "eid":"E1" } { "_id":2, "eid":"E4" } { "_id":3, "eid":"E5" }

Required Result:

count: 2

Resultant Documents: { "_id":2, "eid":"E2" } { "_id":3, "eid":"E3" }

Hi @tag_v,

It's currently not possible to create this kind of visualization in Kibana. What's your specific use case? Maybe it's possible to work around the issue by changing the shape of the ingested data somehow.

Hello @flash1293,

My use case is to show count of distinct eids which are present only in index1 but not in index2 with sample input present in question.

Please suggest feasible ways.

Thanks in advance.

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