diff --git a/docs/reference/mapping/fields/parent-field.asciidoc b/docs/reference/mapping/fields/parent-field.asciidoc index eddf9ef3a25..7862d880c28 100644 --- a/docs/reference/mapping/fields/parent-field.asciidoc +++ b/docs/reference/mapping/fields/parent-field.asciidoc @@ -59,16 +59,18 @@ See the <> and the <> aggregation, and <> for more information. -The value of the `_parent` field is accessible in queries, aggregations, -and scripts: +The value of the `_parent` field is accessible in aggregations +and scripts, and may be queried with the +<>: [source,js] -------------------------- GET my_index/_search { "query": { - "terms": { - "_parent": [ "1" ] <1> + "parent_id": { <1> + "type": "my_parent", + "id": "1" } }, "aggs": { @@ -92,7 +94,7 @@ GET my_index/_search // CONSOLE // TEST[continued] -<1> Querying on the `_parent` field (also see the <> and the <>) +<1> Querying the id of the `_parent` field (also see the <> and the <>) <2> Aggregating on the `_parent` field (also see the <> aggregation) <3> Accessing the `_parent` field in scripts