Hello all,
I am new on the field and I could use some help 
Let's assume I have one index and one type and a list of documents within this type which include the following fields.
-- command_name
-- context_id
-- Other fields...
I can have a number of documents having the same context_id but different command name (relationship one to many). Example:
"context_id" : "1"
"command_name" Command_1
"context_id" : "1"
"command_name" Command_2
"context_id" : "1"
"command_name" Command_3
"context_id" : "2"
"command_name" Command_3
"context_id" : "2"
"command_name" Command_1
"context_id" : "2"
"command_name" Command_4
"context_id" : "3"
"command_name" Command_1
"context_id" : "3"
"command_name" Command_2
"context_id" : "3"
"command_name" Command_3
In this case I would like my query to return.
"
I have in total 2 sets. with the following population:
Set1 = (Command_1, Command_2, Command_3) with population 2 ( seen in 2 contexts (with id 1 and 3))
Set2 = (Command_1, Command_3, Command_4) with population 1 ( seen in 1 contexts (with id 2))
"
Am I able to query this information from Elastic and Visualise this information on Kibana?
Many thanks in advance for spending time on this.
Regards, Telis.
. Adding a sub bucket on context_id should then split each bucket by ids available. If the sets need to defined on the fly across documents it becomes more difficult. To get that case to visualize in Kibana I would suggest pre-processing the data set separately.