| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 | [[query-dsl-has-parent-query]]=== Has Parent QueryThe `has_parent` query accepts a query and a parent type. The query isexecuted in the parent document space, which is specified by the parenttype. This query returns child documents which associated parents havematched. For the rest `has_parent` query has the same options and worksin the same manner as the `has_child` query.[source,js]--------------------------------------------------{    "has_parent" : {        "parent_type" : "blog",        "query" : {            "term" : {                "tag" : "something"            }        }    }}--------------------------------------------------[float]==== Scoring capabilitiesThe `has_parent` also has scoring support. Thesupported score types are `score` or `none`. The default is `none` andthis ignores the score from the parent document. The score is in thiscase equal to the boost on the `has_parent` query (Defaults to 1). Ifthe score type is set to `score`, then the score of the matching parentdocument is aggregated into the child documents belonging to thematching parent document. The score type can be specified with the`score_mode` field inside the `has_parent` query:[source,js]--------------------------------------------------{    "has_parent" : {        "parent_type" : "blog",        "score_mode" : "score",        "query" : {            "term" : {                "tag" : "something"            }        }    }}--------------------------------------------------
 |