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

[source, python]
----
resp = client.search(
    query={
        "function_score": {
            "query": {
                "match": {
                    "message": "elasticsearch"
                }
            },
            "script_score": {
                "script": {
                    "params": {
                        "a": 5,
                        "b": 1.2
                    },
                    "source": "params.a / Math.pow(params.b, doc['my-int'].value)"
                }
            }
        }
    },
)
print(resp)
----
