When searching for some documents using elasticsearch, I would like to see which field in the document was a βhitβ, which is marked as a search result. Is there my own way to do this, or do I need to do this in the search client?
eg:
GET /events/_search?q=nottingham
gives me:
{
{'hits'[
{'id':1,
'name': 'Some name',
'nicknames': ['Nottingham']
}]}}
In this example, it is obvious that the alias is mapped, but can I get elasticsearch to mark this for me?
source
share