rohitgoel
(Rohit Goel)
September 4, 2018, 7:02pm
1
I have a complex data structure that I would want to index in Elastic.
Its a multi level structure with arrays. What's the best way to model it ?
For example,
{
"Organization": "MyOrg",
"Business Units": [
{
"Name": "Sales",
"Location": "SanJose",
"Employees": [
{
"Name": "George",
"Age": "50"
},
{
"Name": "John",
"Age": "30"
}
]
},
{
"Name": "IT",
"Location": "NewYork",
"Employees": [
{
"Name": "Smith",
"Age": "45"
},
{
"Name": "Clark",
"Age": "25"
}
]
}
]
}
jaddison
(James Addison)
September 10, 2018, 4:18am
2
You should probably consider denormalizing your data somewhat.
You might consider 'join' fields to relate Employee to BusinessUnit maybe (there's a fair bit to consider if you do this though, so tread lightly)
By the way, formatting your code so it's indented makes it a lot easier for others to parse it and provide help.
system
(system)
Closed
October 8, 2018, 4:18am
3
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.