コード例 #1
0
 protected function _createIndex($name = 'test', $delete = true, $shards = 1)
 {
     return parent::_createIndex('test_aggregation_' . $name, $delete, $shards);
 }
コード例 #2
0
ファイル: PercolatorTest.php プロジェクト: bungkoko/Elastica
 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;
 }