Elastica php migrating from facets to aggregations


#1

I am looking to migrate a part of a code from facets to aggregations but I am not able to do that because there is not Query.php file in Aggregations folder. Any ideas about to change this code?????:

$facet = new Elastica\Facet\Query($namefacet);
$queryString = new Elastica\Query\QueryString();
$queryString->setDefaultField('timestamp');
$queryString->setQuery('*');
$facet->setQuery($queryString);

Thanks


(system) #2