// This file is autogenerated, DO NOT EDIT
// query-dsl/script-score-query.asciidoc:352

[source, python]
----
resp = client.explain(
    index="my-index-000001",
    id="0",
    query={
        "script_score": {
            "query": {
                "match": {
                    "message": "elasticsearch"
                }
            },
            "script": {
                "source": "\n          long count = doc['count'].value;\n          double normalizedCount = count / 10;\n          if (explanation != null) {\n            explanation.set('normalized count = count / 10 = ' + count + ' / 10 = ' + normalizedCount);\n          }\n          return normalizedCount;\n        "
            }
        }
    },
)
print(resp)
----
