This class provides an abstract base class for all indexer backends.

package midcom.services
see \global\midcom_services_indexer

 Methods

delete (array $RIs)

Removes the document(s) with the given resource identifier(s) from the index.

Parameters

$RIs

arrayThe resource identifier(s) of the document(s) that should be deleted.

Returns

booleanIndicating success.

delete_all (\Optional $constraint)

Clear the index completely or drop documents matching a query.

This will drop the current index.

Parameters

$constraint

\Optionalquery constraint

Returns

booleanIndicating success.

index (array $documents)

Adds a document to the index.

Parameters

$documents

arrayA list of midcom_services_indexer_document objects.

Returns

booleanIndicating success.

query (string $query, \midcom_services_indexer_filter $filter)

Query the index and, if set, restrict the query by a given filter.

Parameters

$query

stringThe query, which must suite the backends query syntax.

$filter

\midcom_services_indexer_filterAn optional filter used to restrict the query. This may be null indicating no filter.

Returns

ArrayAn array of documents matching the query, or false on a failure.