/** * Returns all index settings * * @return array Index settings */ public function getSettings() { // TODO Update as soon as new API is implmented $cluster = new Elastica_Cluster($this->_index->getClient()); $state = $cluster->getState(); return $state['metadata']['indices'][$this->_index->getName()]['settings']; }
public function testGetNodeNames() { $client = new Elastica_Client(); $cluster = new Elastica_Cluster($client); $names = $cluster->getNodeNames(); $this->assertInternalType('array', $names); $this->assertGreaterThan(0, count($names)); }
/** * Checks if the given index is already created * * @return bool True if index exists */ public function exists() { $cluster = new Elastica_Cluster($this->getClient()); return in_array($this->getName(), $cluster->getIndexNames()); }