Hi All:
I have a requirement that I need know the id value of the highlighted nested document. For sample:
{"mappings": {
"item": {
"properties": {
"all": {
"type": "text",
"analyzer":"standard",
"search_analyzer":"whitespace"
},
"main_doc": {
"type": "text",
"copy_to": ["all"]
},
"child_doc": {
"type": "nested",
"properties": {
"doc_content": {
"type": "text",
"copy_to": ["all"]
},
"doc_id": {
"type": "text"
}
}
}
}
}
}
}
After that, we do search on the field "all" and highlight all fields(both main and child without match).
While, the highlight field only return the field name and the highlighted fragment.
My question is , is there a way to return the doc_id value together with the highlight fields in pair. Or away, to get the doc_id value based on the hightlighted field?