// This file is autogenerated, DO NOT EDIT
// query-dsl/has-child-query.asciidoc:141

[source, python]
----
resp = client.search(
    query={
        "has_child": {
            "type": "child",
            "query": {
                "function_score": {
                    "script_score": {
                        "script": "_score * doc['click_count'].value"
                    }
                }
            },
            "score_mode": "max"
        }
    },
)
print(resp)
----
