| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 | [[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. The default is `false` whichignores 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 is set to `true`, then the score of the matching parentdocument is aggregated into the child documents belonging to thematching parent document. The score mode can be specified with the`score_mode` field inside the `has_parent` query:[source,js]--------------------------------------------------{    "has_parent" : {        "parent_type" : "blog",        "score" : true,        "query" : {            "term" : {                "tag" : "something"            }        }    }}--------------------------------------------------
 |