Elastica\Index::refresh PHP Method

refresh() public method

Refreshes the index.
public refresh ( ) : Response
return Response Response object
    public function refresh()
    {
        return $this->request('_refresh', Request::POST, []);
    }

Usage Example

 protected function setUp()
 {
     parent::setUp();
     $this->_index = $this->_createIndex("simple_query_string_test");
     $docs = array(new Document(1, array('make' => 'Gibson', 'model' => 'Les Paul')), new Document(2, array('make' => 'Gibson', 'model' => 'SG Standard')), new Document(3, array('make' => 'Gibson', 'model' => 'SG Supreme')), new Document(4, array('make' => 'Gibson', 'model' => 'SG Faded')), new Document(5, array('make' => 'Fender', 'model' => 'Stratocaster')));
     $this->_index->getType("guitars")->addDocuments($docs);
     $this->_index->refresh();
 }
All Usage Examples Of Elastica\Index::refresh