Path

ez components / documentation / api reference / latest / search


eZ Components latest

Search: ezcSearchIndexHandler

[ Tutorial ] [ Solr schema ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

Interface: ezcSearchIndexHandler

Defines interface for all the search backend implementations. [source]

Method Summary

public void beginTransaction( )
Starts a transaction for indexing.
public void commit( )
Ends a transaction and calls commit.
public ezcSearchDeleteQuery createDeleteQuery( $type, $definition )
Creates a delete query object with the fields from the definition filled in.
public void delete( $query )
Builds the delete query and returns the parsed response
public void deleteById( $id, $definition )
Deletes a document by the document's $id
public void index( $definition, $document )
Indexes the document $document using definition $definition

Methods

beginTransaction

void beginTransaction( )
Starts a transaction for indexing.
When using a transaction, the amount of processing that the search backend does decreases, increasing indexing performance. Without this, the component sends a commit after every document that is indexed. Transactions can be nested, when commit() is called the same number of times as beginTransaction(), the component sends a commit.

commit

void commit( )
Ends a transaction and calls commit.

Throws

ClassDescription
ezcSearchTransactionException if no transaction is active.

createDeleteQuery

ezcSearchDeleteQuery createDeleteQuery( string $type, ezcSearchDocumentDefinition $definition )
Creates a delete query object with the fields from the definition filled in.

Parameters

Name Type Description
$type string  
$definition ezcSearchDocumentDefinition  

delete

void delete( ezcSearchDeleteQuery $query )
Builds the delete query and returns the parsed response

Parameters

Name Type Description
$query ezcSearchDeleteQuery  

deleteById

void deleteById( mixed $id, ezcSearchDocumentDefinition $definition )
Deletes a document by the document's $id

Parameters

Name Type Description
$id mixed  
$definition ezcSearchDocumentDefinition  

index

void index( ezcSearchDocumentDefinition $definition, mixed $document )
Indexes the document $document using definition $definition

Parameters

Name Type Description
$definition ezcSearchDocumentDefinition  
$document mixed  

Last updated: Mon, 21 Dec 2009