// aggregations/bucket/terms-aggregation.asciidoc:466

[source, php]
----
$params = [
    'body' => [
        'aggs' => [
            'genres' => [
                'terms' => [
                    'field' => 'genre',
                    'script' => [
                        'source' => '\'Genre: \' +_value',
                        'lang' => 'painless',
                    ],
                ],
            ],
        ],
    ],
];
$response = $client->search($params);
----
