示例#1
0
 public static function tearDownAfterClass()
 {
     self::$_type->getIndex()->delete();
     CMTest_TH::getServiceManager()->getElasticsearch()->setEnabled(false);
     parent::tearDownAfterClass();
 }
示例#2
0
文件: MaxMind.php 项目: cargomedia/cm
 protected function _updateSearchIndex()
 {
     CM_Model_Location::createAggregation();
     while (CM_Model_Location::getCreateAggregationInProgress($this->getServiceManager()->getDatabases()->getReadMaintenance())) {
         sleep(1);
     }
     $client = $this->getServiceManager()->getElasticsearch()->getClient();
     $type = new CM_Elasticsearch_Type_Location($client);
     $searchIndexCli = new CM_Elasticsearch_Index_Cli(null, $this->_streamOutput, $this->_streamError);
     $searchIndexCli->create($type->getIndexName());
 }
示例#3
0
 protected function _updateSearchIndex()
 {
     CM_Model_Location::createAggregation();
     $type = new CM_Elasticsearch_Type_Location();
     $searchIndexCli = new CM_Elasticsearch_Index_Cli(null, $this->_streamOutput, $this->_streamError);
     $searchIndexCli->create($type->getIndex()->getName());
 }