protected function _createIndex($name = 'test', $delete = true, $shards = 1) { return parent::_createIndex('test_aggregation_' . $name, $delete, $shards); }
protected function _createIndex($name = null, $delete = true, $shards = 1) { $index = parent::_createIndex($name, $delete, $shards); $type = $index->getType('.percolator'); $mapping = new Type\Mapping($type, array('name' => array('type' => 'string'), 'field1' => array('type' => 'string'))); $mapping->disableSource(); $type->setMapping($mapping); return $index; }