Skip to content

Instantly share code, notes, and snippets.

Created November 26, 2016 22:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/04de9d3e4b8c29bbdde29887f8b07f2b to your computer and use it in GitHub Desktop.
Save anonymous/04de9d3e4b8c29bbdde29887f8b07f2b to your computer and use it in GitHub Desktop.
{
"took": 2,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0
},
"hits": {
"total": 2,
"max_score": 1.6931472,
"hits": [
{
"_index": "bookindex",
"_type": "book",
"_id": "1",
"_score": 1.6931472,
"inner_hits": {
"chapters": {
"hits": {
"total": 1,
"max_score": 1.6931472,
"hits": [
{
"_index": "bookindex",
"_type": "book",
"_id": "1",
"_nested": {
"field": "chapters",
"offset": 0
},
"_score": 1.6931472,
"_source": {
"title": "epilogue",
"length": 1230
}
}
]
}
}
}
},
{
"_index": "bookindex",
"_type": "book",
"_id": "2",
"_score": 1.6931472,
"inner_hits": {
"chapters": {
"hits": {
"total": 1,
"max_score": 1.6931472,
"hits": [
{
"_index": "bookindex",
"_type": "book",
"_id": "2",
"_nested": {
"field": "chapters",
"offset": 0
},
"_score": 1.6931472,
"_source": {
"title": "epilogue",
"length": 17
}
}
]
}
}
}
}
]
}
}
@abhishek5678
Copy link

it's not working properly,when i am putting "title":"toc" then inside the hits nothing will be showing it means second nested data is not able to fetch.so please help me to resolve this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment