So my actual json is like this. The above was just a shortened version -
employee
{
"id":"1",
"firstname":"managerFirst",
"lastname":"managerLast"
"email":"test",
"address":"test",
"gender":"male"
assistants:[
{
"id":"122"
"firstname":"assistant1",
"lastname":"assistant1Last"
},
{
"id":"234"
"firstname":"assistant2",
"lastname":"assistant2Last"
}
]
}
Given the above json do you recommend storing assistants as a nested type ? @Mark_Harwood
My requirement is that i want to be able to retrieve parent docs using properties of a child such that retrieve all managers who have an assistant named test.
I was able to search using a match query on assistants.firstname and assistants.lastname but could this cause me any problems in future that i am not aware of or is this way of searching totally fine given my requiremnt and document strcture