elasticsearch - Aggregating on entities within Kibana using values in nested entities -
an elasticsearch index contains product
entity. each product has array of components
entities. component may contain optional outofstock
field.
given following example:
"product": "name": "blue_toy" "components": [ { "partnumber": "100" "supplier": "smith , sons" "outofstock": "true" } { "partnumber": "200" "supplier": "smith , sons" }] } "product": "name": "green_toy" "components": [ { "partnumber": "300" "supplier": "smith , sons" }] }
blue_toy
cannot built because 1 part unavailable.
i want show in chart how many products cannot build, opposed number can built.
given if 1 component unavailable entire product cannot built, in above example distribution 50% - 50%.
note different how many components of total set are of stock (which 33% - 66%).
in essense, question how mark or flag root entity based on contents of 1 of nested entities.
how 1 in kibana?
thanks
i dont know if fit in exemple once did have similar problem solved "copy_to" parameter.
in exemple, have change mapping of product add "copy_to" "outofstock" field.
it'll create field (with specified name) in root document "outofstock" value.
this field add @ indexing time , can if field created "copy_to" "true" product cannot built.
see: https://www.elastic.co/guide/en/elasticsearch/reference/1.4/mapping-core-types.html
Comments
Post a Comment