/**
  * @group functional
  */
 public function testCardinalityAggregation()
 {
     $agg = new Cardinality('cardinality');
     $agg->setField('color');
     $query = new Query();
     $query->addAggregation($agg);
     $results = $this->_getIndexForTest()->search($query)->getAggregation('cardinality');
     $this->assertEquals(3, $results['value']);
 }
 public function testCardinalityAggregation()
 {
     $agg = new Cardinality("cardinality");
     $agg->setField("color");
     $query = new Query();
     $query->addAggregation($agg);
     $results = $this->_index->search($query)->getAggregation("cardinality");
     $this->assertEquals(3, $results['value']);
 }