@lukeelmers
Thanks, Is it your recommendation to have restructure the document with "join" (parent-child) in single Index?
I would also like to have data structure to relation kind-of document instead of single document,
Could you give more in-sight, since I'm using Elastic-search version 7.2 which does not have mappings. How does Routing works?
I was checking into https://www.elastic.co/guide/en/elasticsearch/reference/7.2/parent-join.html for reference.
My use case does suit for "Join" the one-to-many relationship where one entity significantly outnumbers the other entity.
But does Kibana support Parent/Child? If not what would be other options?
Because in my use case few filters for Kibana Dashboard of child (item) are based on the parent (root), eg (properties - state, type, active)
Count number of Child Item filtered by parent state=1 and active =1 and few other scenarios
{
"id":50,"created_at":"2019-05-10T00:00:00","state":1,"type":"Blue","active":1,
"item":[
{"id":5,"count":1,"created_at":"2020-03-05T00:00:00"},
{"id":11, "count":1,"created_at":"2020-03-05T00:00:00"}
]
},
{
"id":65,"created_at":"2019-05-01T00:00:00","state":3,"type":"Green","active":0,
"item":[
{"id":15, "count":1,"created_at":"2020-05-10T00:00:00"},
{"id":19, "count":1,"created_at":"2020-03-05T00:00:00"}
]
}
After restructuring the doc
{"id":50,"created_at":"2019-05-10T00:00:00","state":1,"type":"Blue","active":1},
{"id":65,"created_at":"2019-05-01T00:00:00","state":3,"type":"Green","active":0},
{"id":5,"count":1,"created_at":"2020-03-05T00:00:00","parent_id":50},
{"id":11, "count":1,"created_at":"2020-03-05T00:00:00","parent_id":50},
{"id":15, "count":1,"created_at":"2020-05-10T00:00:00","parent_id":65},
{"id":19, "count":1,"created_at":"2020-03-05T00:00:00","parent_id":65}