コード例 #1
0
ファイル: ElasticaTest.php プロジェクト: gdbots/pbj-php
 /**
  * Create the test index before tests run.
  */
 protected static function createIndex()
 {
     self::$index->create(['analysis' => ['analyzer' => MappingFactory::getCustomAnalyzers()]], true);
     $type = self::$index->getType('message');
     $mapping = (new MappingFactory())->create(EmailMessage::schema(), 'english');
     $mapping->setType($type);
     $mapping->send();
 }