PHP Class Doctrine\Search\ElasticSearch\Client

Author: Mike Lohmann ([email protected])
Author: Markus Bachmann ([email protected])
Inheritance: implements Doctrine\Search\SearchClientInterface
Show file Open project: doctrine/search Class Usage Examples

Public Methods

Method Description
__construct ( Client $client )
addDocuments ( ClassMetadata $class, array $documents ) {@inheritDoc}
createIndex ( $name, array $config = [] ) {@inheritDoc}
createType ( ClassMetadata $metadata ) {@inheritDoc}
deleteIndex ( $index ) {@inheritDoc}
deleteType ( ClassMetadata $metadata ) {@inheritDoc}
find ( ClassMetadata $class, $id, $options = [] ) {@inheritDoc}
findAll ( array $classes ) {@inheritDoc}
findOneBy ( ClassMetadata $class, $field, $value )
getClient ( ) : Client
getIndex ( $name ) {@inheritDoc}
refreshIndex ( $index ) {@inheritDoc}
removeAll ( ClassMetadata $class, $query = null ) {@inheritDoc}
removeDocuments ( ClassMetadata $class, array $documents ) {@inheritDoc}
search ( $query, array $classes ) {@inheritDoc}

Protected Methods

Method Description
buildQuery ( array $classes )
getMapping ( array $mappings ) Generates property mapping from entity annotations
getParameters ( array $paramMapping ) Generates parameter mapping from entity annotations
getRootMapping ( array $mappings ) Generates root mapping from entity annotations

Method Details

__construct() public method

public __construct ( Client $client )
$client Elastica\Client

addDocuments() public method

{@inheritDoc}
public addDocuments ( ClassMetadata $class, array $documents )
$class Doctrine\Search\Mapping\ClassMetadata
$documents array

buildQuery() protected method

protected buildQuery ( array $classes )
$classes array

createIndex() public method

{@inheritDoc}
public createIndex ( $name, array $config = [] )
$config array

createType() public method

{@inheritDoc}
public createType ( ClassMetadata $metadata )
$metadata Doctrine\Search\Mapping\ClassMetadata

deleteIndex() public method

{@inheritDoc}
public deleteIndex ( $index )

deleteType() public method

{@inheritDoc}
public deleteType ( ClassMetadata $metadata )
$metadata Doctrine\Search\Mapping\ClassMetadata

find() public method

{@inheritDoc}
public find ( ClassMetadata $class, $id, $options = [] )
$class Doctrine\Search\Mapping\ClassMetadata

findAll() public method

{@inheritDoc}
public findAll ( array $classes )
$classes array

findOneBy() public method

public findOneBy ( ClassMetadata $class, $field, $value )
$class Doctrine\Search\Mapping\ClassMetadata

getClient() public method

public getClient ( ) : Client
return Elastica\Client

getIndex() public method

{@inheritDoc}
public getIndex ( $name )

getMapping() protected method

Generates property mapping from entity annotations
protected getMapping ( array $mappings )
$mappings array

getParameters() protected method

Generates parameter mapping from entity annotations
protected getParameters ( array $paramMapping )
$paramMapping array

getRootMapping() protected method

Generates root mapping from entity annotations
protected getRootMapping ( array $mappings )
$mappings array

refreshIndex() public method

{@inheritDoc}
public refreshIndex ( $index )

removeAll() public method

{@inheritDoc}
public removeAll ( ClassMetadata $class, $query = null )
$class Doctrine\Search\Mapping\ClassMetadata

removeDocuments() public method

{@inheritDoc}
public removeDocuments ( ClassMetadata $class, array $documents )
$class Doctrine\Search\Mapping\ClassMetadata
$documents array