SilverStripe solr Search

DataObjectExtension extends DataExtension
in package

Class \Firesphere\SolrSearch\Compat\DataObjectExtension

Extend every DataObject with the option to update the index.

Table of Contents

Properties

$cachedClasses  : array<string|int, mixed>
$owner  : DataObject|DataObjectExtension
$siteConfig  : SiteConfig

Methods

doReindex()  : mixed
Reindex this owner object in Solr This is a simple stub for the push method, for semantic reasons It should never be called on Objects that are not a valid class for any Index It does not check if the class is valid to be pushed to Solr
getViewStatus()  : array<string|int, mixed>
Get the view status for each member in this object
onAfterDelete()  : void
Attempt to remove the item from Solr
onAfterPublish()  : mixed
Push the item to Solr after publishing
onAfterWrite()  : mixed
Push the item to solr if it is not versioned Update the index after write.
clearIDs()  : void
Remove the owner ID from the dirty ID set
getDirtyClass()  : DirtyClass
Find or create a new DirtyClass for recording dirty IDs
getGroupViewPermissions()  : array<string|int, mixed>
Determine the view permissions based on group settings
pushToSolr()  : mixed
Try to push the newly updated item to Solr
registerException()  : void
Register the exception of the attempted index for later clean-up use
shouldPush()  : bool
Should this write be pushed to Solr

Properties

$cachedClasses

public static array<string|int, mixed> $cachedClasses

Cached permission list

Methods

doReindex()

Reindex this owner object in Solr This is a simple stub for the push method, for semantic reasons It should never be called on Objects that are not a valid class for any Index It does not check if the class is valid to be pushed to Solr

public doReindex() : mixed
Tags
throws
HTTPException
throws
ReflectionException
throws
ValidationException
throws
InvalidArgumentException

getViewStatus()

Get the view status for each member in this object

public getViewStatus() : array<string|int, mixed>
Return values
array<string|int, mixed>

onAfterDelete()

Attempt to remove the item from Solr

public onAfterDelete() : void
Tags
throws
ValidationException
throws
HTTPException

onAfterPublish()

Push the item to Solr after publishing

public onAfterPublish() : mixed
Tags
throws
ValidationException
throws
HTTPException
throws
ReflectionException
throws
InvalidArgumentException

onAfterWrite()

Push the item to solr if it is not versioned Update the index after write.

public onAfterWrite() : mixed
Tags
throws
ValidationException
throws
HTTPException
throws
ReflectionException
throws
InvalidArgumentException

clearIDs()

Remove the owner ID from the dirty ID set

protected clearIDs(DataObject $owner, array<string|int, mixed> $ids, DirtyClass $record) : void
Parameters
$owner : DataObject
$ids : array<string|int, mixed>
$record : DirtyClass
Tags
throws
ValidationException

getDirtyClass()

Find or create a new DirtyClass for recording dirty IDs

protected getDirtyClass(string $type) : DirtyClass
Parameters
$type : string
Tags
throws
ValidationException
Return values
DirtyClass

getGroupViewPermissions()

Determine the view permissions based on group settings

protected getGroupViewPermissions(DataObject|SiteTree|SiteConfig $owner) : array<string|int, mixed>
Parameters
$owner : DataObject|SiteTree|SiteConfig
Return values
array<string|int, mixed>

pushToSolr()

Try to push the newly updated item to Solr

protected pushToSolr(DataObject $owner) : mixed
Parameters
$owner : DataObject
Tags
throws
ValidationException
throws
HTTPException
throws
ReflectionException
throws
InvalidArgumentException

registerException()

Register the exception of the attempted index for later clean-up use

protected registerException(array<string|int, mixed> $ids, DirtyClass $record, Exception $error) : void
Parameters
$ids : array<string|int, mixed>
$record : DirtyClass
$error : Exception
Tags
codeCoverageIgnore

This is actually tested through reflection. See

throws
ValidationException
throws
HTTPException

shouldPush()

Should this write be pushed to Solr

protected shouldPush() : bool
Return values
bool

        
On this page

Search results