Path

ez components / documentation / api reference / 2008.1 / search


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 )
Creates a delete query object with the fields from the definition filled in.
public ezcSearchResult delete( $query )
Builds the delete query and returns the parsed response
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 )
Creates a delete query object with the fields from the definition filled in.

Parameters

Name Type Description
$type string  

delete

Builds the delete query and returns the parsed response

Parameters

Name Type Description
$query ezcSearchDeleteQuery  

index

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

Parameters

Name Type Description
$definition ezcSearchDocumentDefinition  
$document mixed  

Last updated: Wed, 18 Jun 2008