PHP Interface Newscoop\Search\IndexClientInterface

Show file Open project: sourcefabric/newscoop Interface Usage Examples

Public Methods

Method Description
__construct ( Symfony\Component\DependencyInjection\Container $container ) Initialize class
add ( array $item ) : boolean Add given item
delete ( String $itemId ) : boolean Delete given article by id
deleteAll ( ) : boolean Delete all indexed data
flush ( ) : boolean Commit changes to index
isEnabled ( $clientName ) : boolean Checks whether the index client is enabled for the current service
isTypeIndexable ( string $serviceName, $itemSubType ) : boolean Checks whether the subtype is indexable.
setItem ( Newscoop\Search\DocumentInterface $item ) Set item. This method gives the possibility for the indexing client to access extra data in regards to the default indexable content.
setService ( Newscoop\Search\ServiceInterface $service ) Set service for the current client
update ( array $item ) : boolean Update given item

Method Details

__construct() public method

Initialize class
public __construct ( Symfony\Component\DependencyInjection\Container $container )
$container Symfony\Component\DependencyInjection\Container

add() public method

Add given item
public add ( array $item ) : boolean
$item array
return boolean

delete() public method

Delete given article by id
public delete ( String $itemId ) : boolean
$itemId String
return boolean

deleteAll() public method

Delete all indexed data
public deleteAll ( ) : boolean
return boolean

flush() public method

Commit changes to index
public flush ( ) : boolean
return boolean

isEnabled() public method

Checks whether the index client is enabled for the current service
public isEnabled ( $clientName ) : boolean
return boolean

isTypeIndexable() public method

Checks whether the subtype is indexable.
public isTypeIndexable ( string $serviceName, $itemSubType ) : boolean
$serviceName string Name of the service
return boolean

setItem() public method

Set item. This method gives the possibility for the indexing client to access extra data in regards to the default indexable content.
public setItem ( Newscoop\Search\DocumentInterface $item )
$item Newscoop\Search\DocumentInterface

setService() public method

Set service for the current client
public setService ( Newscoop\Search\ServiceInterface $service )
$service Newscoop\Search\ServiceInterface

update() public method

Update given item
public update ( array $item ) : boolean
$item array
return boolean