Apache Zeta Components - high quality PHP components

Apache Zeta Components Manual :: Docs For Class ezcSearchIndexHandler

Search::ezcSearchIndexHandler

Interface ezcSearchIndexHandler

Defines interface for all the search backend implementations.

Source for this file: /Search/src/interfaces/index_handler.php

Version:   //autogentag//

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.

Exceptions:
Type Description
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
Documentation generated by phpDocumentor 1.4.3