\midcom_services_indexer_backend

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

Summary

Methods
Constants
index()
delete()
delete_all()
query()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

index()

index(array  $documents) 

Adds a document to the index.

Parameters

array $documents

A list of midcom_services_indexer_document objects.

delete()

delete(array  $RIs) 

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

Parameters

array $RIs

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

delete_all()

delete_all(  $constraint) 

Clear the index completely or drop documents matching a query.

This will drop the current index.

Parameters

$constraint

query()

query(string  $query, \midcom_services_indexer_filter  $filter = null, array  $options = array()) : array<mixed,\midcom_services_indexer_document>

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

Parameters

string $query

The query, which must suite the backends query syntax.

\midcom_services_indexer_filter $filter

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

array $options

Options to modify the backend behavior

Returns

array<mixed,\midcom_services_indexer_document> —

An array of documents matching the query