ElasticSearcher\Managers\IndicesManager::indices PHP Method

indices() public method

public indices ( ) : mixed
return mixed
    public function indices()
    {
        return $this->elasticSearcher->getClient()->indices()->getMapping(['_all']);
    }

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'));
 }