// This file is autogenerated, DO NOT EDIT
// search/search-your-data/retrieve-selected-fields.asciidoc:770

[source, python]
----
resp = client.search(
    query={
        "match_all": {}
    },
    script_fields={
        "test1": {
            "script": "params['_source']['message']"
        }
    },
)
print(resp)
----
