ElasticSearcher\Managers\IndicesManager::get PHP Method

get() public method

public get ( string $indexName ) : array
$indexName string
return array
    public function get($indexName)
    {
        $index = $this->getRegistered($indexName);
        $params = ['index' => $index->getInternalName()];
        return $this->elasticSearcher->getClient()->indices()->getMapping($params);
    }

Usage Example

 public function testGetting()
 {
     $this->indicesManager->create('authors');
     $authorsIndex = new AuthorsIndex();
     $this->assertArrayHasKey('authors', $this->indicesManager->indices());
     $expectedIndex = ['authors' => ['mappings' => $authorsIndex->getTypes()]];
     $this->assertEquals($expectedIndex, $this->indicesManager->get('authors'));
     $expectedIndex = ['authors' => ['mappings' => array_only($authorsIndex->getTypes(), 'producers')]];
     $this->assertEquals($expectedIndex, $this->indicesManager->getType('authors', 'producers'));
 }
All Usage Examples Of ElasticSearcher\Managers\IndicesManager::get