what will be the best way to filter on a given attribute and translate the filter to a related secondary attribute/relationship? consider below data set, if filter on color, customer who bought red also bought blue, but customer bought orange did not buy any other color. if wrapped in a app, I can do two pass, first select all the customers that bought items have color Red, then another pass and show me distinct item colors that list of customers from the first pass bought. how can this be achieved in Kibana and visualize it?
PUT /orders
{
"mappings": {
"order": {
"properties": {
"brand": { "type": "keyword"},
"color": { "type": "keyword"},
"custid": { "type": "keyword"}
}
}
}
}
PUT /orders/order/1?refresh
{
"brand": "gucci",
"color": "red",
"custid": "1"
}
PUT /orders/order/1?refresh
{
"brand": "gap",
"color": "red",
"custid": "1"
}
PUT /orders/order/2?refresh
{
"brand": "gap",
"color": "blue",
"custid": "1"
}
PUT /orders/order/3?refresh
{
"brand": "gap",
"color": "orange",
"custid": "2"
}

