Elastica\Cluster::getIndexNames PHP 메소드

getIndexNames() 공개 메소드

Return list of index names.
public getIndexNames ( ) : array
리턴 array List of index names
    public function getIndexNames()
    {
        return array_keys($this->_data['metadata']['indices']);
    }

Usage Example

예제 #1
0
파일: Index.php 프로젝트: kskod/Elastica
 /**
  * Checks if the given index is already created
  *
  * @return bool True if index exists
  */
 public function exists()
 {
     $cluster = new Cluster($this->getClient());
     return in_array($this->getName(), $cluster->getIndexNames());
 }