public function findTypes($query)
    {
        $facet = new TermsAggregation('type');
        $facet->setField('_type');
        $facet->setSize(200);
        $query->aggregate($facet);
        return $query->limit(1);
    }
public function findTypes($query)
    {
        $facet = new TermsAggregation('type');
        $facet->setField('_type');
        $facet->setSize(200);
        $query->aggregate($facet);
        return $query->limit(1);
    }
public function findTypes ( $ query ) { $ facet = new TermsAggregation ( 'type' ) ; $ facet -> setField ( '_type' ) ; $ facet -> setSize ( 200 ) ; $ query -> aggregate ( $ facet ) ; return $ query -> limit ( 1 ) ; }
Returns a query setup for getting the 'type' aggregation.

@param Cake\ElasticSearch\Query $query The Query Object
@return Cake\ElasticSearch\Query
Returns a query setup for getting the type aggregation .