How can i fetch nested object in elastic search ?
{
"_index": "userinfo",
"_type": "userdetails",
"_id": "2",
"_score": 1,
"_source": {
"id": "2",
"name": "Robert Mark",
"age": 42,
"email": "[email protected]",
"userType": {
"id": "3",
"type": "End User"
},
"hobbies": [
{
"id": "3",
"description": "Writing Books"
},
{
"id": "4",
"description": "Gardening"
}
]
}
}
This is my json structure i want to fetch all the records where description under hobbies are "Gardening" .
I am new to elastic search please help me for this if any one knows .
"description": "Gardening"