Compatibility with Nested Query
The join
filter within a nested
query is currently supported. The join key must specify the field path within the scope of the nested object. For example, as shown below, the join key must be foreign_key
and not nested_obj.foreign_key
.
GET /siren/index1/_search { "query" : { "nested" : { "path" : "nested_obj", "query" : { "join" : { "indices" : ["index2"], "types" : ["type"], "on" : ["foreign_key", "id"], "request" : { "query" : { "match_all" : {} } } } } } } }
A nested
query within a join
filter is also supported if and only if the join key does not refer to a field of the nested object.