[1.5] Querying Nested docuement

How can i request document with nested field ?

My mapping :

{ "pi_idxtickets": { "mappings": { "ticket": { "properties": { "providers": { "type": "nested", "properties": { "name": { "type": "string" }, "uid": { "type": "string", "index": "not_analyzed" } } } } } } } }

My request :

{ "from" : 0, "size" : 100, "query" : { "filtered" : { "query" : { "bool" : { "must" : { "terms" : { "providers.uid" : [ "24e2e58c-109f-857f-aaa6-378b7eb26092" ] } } } }, "filter" : { "bool" : { "must" : { "match_all" : { } } } } } }

But that don't works. Any idea ? Thx.

I try this request :

{"from":0,"size":100,"query":{"filtered":{"query":{"bool":{"must":{"nested":{"query":{"terms":{"providers.uid":["24e2e58c-109f-857f-aaa6-378b7eb26092"]}},"path":"providers.uid"}}}},"filter":{"bool":{"must":{"match_all":{}}}}}},"sort":[{"updated":{"order":"desc"}}]}

But that return me error response because i have some doc where providers is empty. Any idea how to deal with that ?

Ok i find my mistake. path parameter should be setted with providers and not with providers.uid.