What I need that I have NOT figured out
I would like to get the path(s) to the found text. Where the path would be
book name -> chapter number -> verse number (which is a sibling to verses.text)
What I did figure out how to do was to return the text highlighted using 'highlight'
QUERY
GET /bible-book/_search
{
"_source": false,
"query": {
"nested": {
"path": "chapters",
"query": {
"nested": {
"path": "chapters.verses",
"query": {
"match": {
"chapters.verses.text": "consolation"
}
}
}
}
}
}
}
MAPPING
{
"bible-book": {
"mappings": {
"properties": {
"book": {
"type": "text"
},
"chapters": {
"type": "nested",
"properties": {
"chapter": {
"type": "integer"
},
"verses": {
"type": "nested",
"properties": {
"text": {
"type": "text"
},
"verse": {
"type": "integer"
}
}
}
}
}
}
}
}
}