SilverStripe\SearchService\Extensions\SearchServiceExtension
The extension that provides implicit indexing features to dataobjects
Synopsis
class SearchServiceExtension
extends DataExtension
{
- // members
- private static array $db = ;
- private bool $hasConfigured = false;
- // methods
- public void __construct()
- public void updateCMSFields()
- public void requireDefaultRecords()
- public void addToIndexes()
- public void removeFromIndexes()
- public void onAfterPublish()
- public void onAfterUnpublish()
- public void onAfterDelete()
- // Inherited methods from ServiceAware
- public IndexingInterface getIndexService()
- public $this setIndexService()
- public bool hasIndexService()
- // Inherited methods from ConfigurationAware
- public $this setConfiguration()
- public IndexConfiguration getConfiguration()
- // Inherited methods from BatchProcessorAware
- public $this setBatchProcessor()
- public BatchDocumentInterface getBatchProcessor()
Hierarchy
Extends
- SilverStripe\ORM\DataExtension
Uses
- SilverStripe\Core\Config\Configurable
- SilverStripe\Core\Injector\Injectable
- SilverStripe\SearchService\Service\Traits\ServiceAware
- SilverStripe\SearchService\Service\Traits\ConfigurationAware
- SilverStripe\SearchService\Service\Traits\BatchProcessorAware
Members
private
- $db — array
- $hasConfigured — SilverStripe\SearchService\Extensions\bool
Methods
public
- __construct() — SearchServiceExtension constructor.
- addToIndexes() — Index this record into search or queue if configured to do so
- onAfterDelete() — Before deleting this record ensure that it is removed from search.
- onAfterPublish() — When publishing the page, push this data to Indexer. The data which is sent to search is the rendered template from the front end.
- onAfterUnpublish() — When unpublishing this item, remove from search
- removeFromIndexes() — Remove this item from search
- requireDefaultRecords() — On dev/build ensure that the indexer settings are up to date.
- updateCMSFields()