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

[source, php]
----
$params = [
    'body' => [
        'aggs' => [
            'genres' => [
                'terms' => [
                    'field' => 'genre',
                ],
            ],
        ],
    ],
];
$response = $client->search($params);
----
