Solr implementation of the indexer backend.

This works by communicating with solr over http requests.

see \global\midcom_services_indexer
package midcom.services

 Methods

__construct ($index_name)

Constructor is empty at this time.

Parameters

$index_name

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 ($constraint)

Clear the index completely or by constraint.

Parameters

$constraint

Returns

booleanIndicating success.

index (array $documents)

Adds a document to the index.

Any warning will be treated as error.

Note, that $document may also be an array of documents without further changes to this backend.

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.

 Properties

 

mixed $_index_name

The "index" to use (Solr has single index but we add this as query constraint as necessary
 

\midcom_services_indexer_solrDocumentFactory $factory

The xml factory class
 

\midcom_services_indexer_solrRequest $request

The http_request wrapper