class IndexerAction

Class IndexerAction

Properties

SearchController $mod

Methods

void
addToIndex(DocumentIndex $documentIndex)

Adds the passed DocumentIndex to the search index

buildNormalizedAttachments(SearchIndexRecord $searchIndexRecord, int $depth = 5)

Resolves the attachment array into file paths

findAndSetTags(SearchIndexRecord $searchIndexRecord)

Finds tags from tagging module and sets them.

getSearchAdapter()

Returns the currently used Search Adapter

process(SearchIndexRecord $searchIndexRecord)

Process all relevant things for this search index entry (attachments, tags, etc.)

processPreProcessorHooks(SearchIndexRecord $searchIndexRecord)

Applies available search.search_preprocessor hooks on the SearchIndexRecord

mixed
removeFromIndex(DocumentIndex $documentIndex)

Removed the passed Document from the search index

updateDocumentsByCallback(array $documentIds, callable $callback, $requiredFields = ['_id', 'meta_data'])

Mass Update to update a few search index attributes for many documents at once This command will not create new Index entries but only update existing ones

Details

at line 67
void addToIndex(DocumentIndex $documentIndex)

Adds the passed DocumentIndex to the search index

Parameters

DocumentIndex $documentIndex

Return Value

void

Exceptions

Exception

at line 186
protected SearchIndexRecord buildNormalizedAttachments(SearchIndexRecord $searchIndexRecord, int $depth = 5)

Resolves the attachment array into file paths

Parameters

SearchIndexRecord $searchIndexRecord
int $depth

Return Value

SearchIndexRecord

at line 163
protected SearchIndexRecord findAndSetTags(SearchIndexRecord $searchIndexRecord)

Finds tags from tagging module and sets them.

Parameters

SearchIndexRecord $searchIndexRecord

Return Value

SearchIndexRecord

at line 37
SearchAdapterInterface getSearchAdapter()

Returns the currently used Search Adapter

Return Value

SearchAdapterInterface

at line 122
SearchIndexRecord process(SearchIndexRecord $searchIndexRecord)

Process all relevant things for this search index entry (attachments, tags, etc.)

Parameters

SearchIndexRecord $searchIndexRecord

Return Value

SearchIndexRecord

Exceptions

Exception

at line 144
protected SearchIndexRecord processPreProcessorHooks(SearchIndexRecord $searchIndexRecord)

Applies available search.search_preprocessor hooks on the SearchIndexRecord

Parameters

SearchIndexRecord $searchIndexRecord

Return Value

SearchIndexRecord

at line 101
mixed removeFromIndex(DocumentIndex $documentIndex)

Removed the passed Document from the search index

Parameters

DocumentIndex $documentIndex

Return Value

mixed

at line 112
updateDocumentsByCallback(array $documentIds, callable $callback, $requiredFields = ['_id', 'meta_data'])

Mass Update to update a few search index attributes for many documents at once This command will not create new Index entries but only update existing ones

Parameters

array $documentIds

List of document ids which shall be processed / updated

callable $callback

Function to be called for each document entry. Retrieves the requiredFields + ES document infos as an $hit array parameter

$requiredFields