Elastica\Status::refresh PHP Method

refresh() public method

Refresh status object.
public refresh ( )
    public function refresh()
    {
        $path = '_stats';
        $this->_response = $this->_client->request($path, Request::GET);
        $this->_data = $this->getResponse()->getData();
    }

Usage Example

Example #1
0
 public function testAliasExists()
 {
     $indexName = 'test';
     $aliasName = 'elastica_test-alias';
     $index1 = $this->_createIndex();
     $status = new Status($index1->getClient());
     foreach ($status->getIndicesWithAlias($aliasName) as $tmpIndex) {
         $tmpIndex->removeAlias($aliasName);
     }
     $this->assertFalse($status->aliasExists($aliasName));
     $index1->addAlias($aliasName);
     $status->refresh();
     $this->assertTrue($status->aliasExists($aliasName));
 }
All Usage Examples Of Elastica\Status::refresh