Search value based on specific field as child field are dynamic

The collection looks like this

                                "username":"Nothing on",
                                "works": "IT"

using a multi-match query with phrase_prefix, want to search value based on fields. The fields within the hierarchy are dynamic. Want to search field based on specific fields

        "from": 0,
                "query": {
                "multi_match": {
                    "query": "Finance",
                    "type": "phrase_prefix",
                    "fields": [

To search IT we should specify like or for unknown hierarchy.Owner, as it is dynamic cant specify for all, trying with regex but getting an error, is there any way to get it.HOe

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.