Here is an example of my issue:
I’m a kitchen supplier who wants to visualize the makeup of kitchen's I've sold to customers. I have data in elasticsearch the form of kitchen index which has a type (modern, new, old, etc.) and chairs which is a list of models (a, b,c, d, etc.) & counts (# of each model in the kitchen).
kitchen |- type \- chair |- model \- count
Theoretical data:
kitchen/1 >> { "type": "old", "chair": [ { "model": "a", "count": 4 }, { "model": "b", "count": 2 } ] }
kitchen/2 >> { "type": "old", "chair": [ { "model": "b", "count": 2 }, { "model": "c", "count": 2 } ] }
kitchen/3 >> { "type": "new", "chair": [ { "model": "c", "count": 10 } ] }
kitchen/4 >> { "type": "new", "chair": [ { "model": "a", "count": 1 }, { "model": "b", "count": 1 }, { "model": "c", "count": 1 } ] }
Notice this doesn't have to be how the data is structured
I want to make the Pie Chart of “For kitchen model [old] what are the top 10 chair models listed by
the sum of their counts?”. How would you do this in Kibana?
I'm aware, after much headache, of Kibana's current missing support for nested objects and parent/child.
I've tried:
- Changing chair to "type": "nested", "include_in_parent": true
- This results in a incorrect sum when multiple chairs models are present in a single kitchen
- Tried Parent/Child
- Cannot include a visualization of both the parent and child documents (The above desired visualization)
- The Kibana branch with "Full Nested Support"
- Cannot install: npm install fails as everything is deprecated
Other visualizations that need to work:
- "Top 5 Kitchen types based on how the sum of many chairs they contain?"
- "For chair model [a] how many chairs are sitting in kitchens?"
I'm looking for any help as to how to restructure the data to accomplish this. I.E. How would you denormalize this as that seems to be what Kibana wants?
Thank you in advance.