Elastica\Cluster::getIndexNames PHP Méthode

getIndexNames() public méthode

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

Usage Example

Exemple #1
0
 /**
  * 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());
 }