Solr
extends AbstractFallbackLoader
in package
Solr record fallback loader
Tags
Table of Contents
- $legacyIdField : string|null
- $recordIdUpdater : RecordIdUpdater
- $resourceService : ResourceServiceInterface
- $searchService : Service
- $source : string
- Record source
- __construct() : mixed
- Constructor
- load() : array<string|int, mixed>
- Given an array of IDs that failed to load, try to find them using a fallback mechanism.
- fetchSingleRecord() : RecordCollectionInterface
- Fetch a single record (null if not found).
- updateRecord() : void
- When a record ID has changed, update the record driver and database to reflect the changes.
Properties
$legacyIdField
protected
string|null
$legacyIdField
= 'previous_id_str_mv'
$recordIdUpdater
protected
RecordIdUpdater
$recordIdUpdater
$resourceService
protected
ResourceServiceInterface
$resourceService
$searchService
protected
Service
$searchService
$source
Record source
protected
string
$source
= 'Solr'
Methods
__construct()
Constructor
public
__construct(ResourceServiceInterface $resourceService, RecordIdUpdater $recordIdUpdater, Service $searchService[, string|null $legacyIdField = 'previous_id_str_mv' ]) : mixed
Parameters
- $resourceService : ResourceServiceInterface
-
Resource database service
- $recordIdUpdater : RecordIdUpdater
-
Record ID updater service
- $searchService : Service
-
Search service
- $legacyIdField : string|null = 'previous_id_str_mv'
-
Solr field containing legacy IDs (null to disable lookups)
Return values
mixed —load()
Given an array of IDs that failed to load, try to find them using a fallback mechanism.
public
load(array<string|int, mixed> $ids) : array<string|int, mixed>
Parameters
- $ids : array<string|int, mixed>
-
IDs to load
Return values
array<string|int, mixed> —fetchSingleRecord()
Fetch a single record (null if not found).
protected
fetchSingleRecord(string $id) : RecordCollectionInterface
Parameters
- $id : string
-
ID to load
Return values
RecordCollectionInterface —updateRecord()
When a record ID has changed, update the record driver and database to reflect the changes.
protected
updateRecord(AbstractBase|PreviousUniqueIdInterface $record, string $previousId) : void
Parameters
- $record : AbstractBase|PreviousUniqueIdInterface
-
Record to update
- $previousId : string
-
Old ID of record