ElasticSearch索引包含Product
實體。每個產品都有一組Components
實體。 組件可能包含可選的outOfStock
字段。使用嵌套實體中的值彙總Kibana中的實體
考慮下面的例子:
"Product":
"name": "blue_toy"
"Components": [
{
"partnumber": "100"
"supplier": "smith and sons"
"outOfStock": "true"
}
{
"partnumber": "200"
"supplier": "smith and sons"
}]
}
"Product":
"name": "green_toy"
"Components": [
{
"partnumber": "300"
"supplier": "smith and sons"
}]
}
blue_toy
不能建立,因爲一個部分是不可用的。
我想在圖表中顯示有多少產品無法構建,而不是可以構建的數量。
鑑於即使只有一個組件不可用,也無法構建整個產品,在上面的示例中,分配將是50% - 50%。
請注意,這與總套件中有多少組件有庫存(33%-66%)不同。
在本質上,問題是如何基於其嵌套實體的內容標記或標記根實體。
在基巴納怎麼能做到這一點?
感謝