Getting field name

We have following example :

In the example :

{
"tweet": [elasticsearch, flexible, very],
"user.id": [@jsmith],
"user.gender": [male],
"user.age": [26],
"user.name.full": [john, smith],
"user.name.first": [john],
"user.name.last": [smith]
}

If the user searched for “john”, the search result will have [user.name.full, user.name.first ] as field names in the response.

Is it possible? if so can someone give direction?

Thanks!