Nested query without knowing the path

How to query the nested objects without knowing the nested path? In our example there are multiple nested levels and the query should be executed on all the nested paths.

The below example works as the path is specified. I want the fields to be verified on all the nested paths. Can I use some kind of wildcard for path like "path": "*"?

curl -X GET "localhost:9200/_search?pretty=true" -H 'Content-Type: application/json' -d'
"query": {
"nested": {
"path": "user",
"query": {
"bool": {
"must": [

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