Пример #1
0
 protected function getLastIndexName()
 {
     try {
         $indices = $this->client->indices()->getAlias(['name' => $this->getIndexName()]);
         return IndexNameResolver::getLastIndexName(array_keys($indices));
     } catch (Missing404Exception $e) {
         return null;
     }
 }
Пример #2
0
 /**
  * @covers \Keboola\Syrup\Elasticsearch\IndexNameResolver::getLastIndexname
  * @dataProvider resolutionData
  */
 public function testLastIndexNameResolution($expected, $indices)
 {
     $this->assertEquals($expected, IndexNameResolver::getLastIndexName($indices));
 }