A PHP client for elasticsearch.
Elasticsearch provides a way to aggregate data which is mapped by accordingly
classes that can be added to the query.
Adding aggregations to query
New aggregations can be created and added to the query afterwards:
$facet = new \Elastica\Aggregation\Terms('Some label', 'fieldName');
$facet = new \Elastica\Aggregation\DateHistogram('Some label again', 'fieldName', 'month');
For further information check out the different
classes and official Documentation.
Accessing Aggregations in result
Returned aggregations are available at