SolrWebBackendFactory
extends AbstractSolrBackendFactory
in package
Factory for the website SOLR backend.
Tags
Table of Contents
- $allowFallbackForIndexName : bool
- When looking up the Solr index name config setting, should we allow fallback into the main configuration (true), or limit ourselves to the search config (false)?
- $backendClass : string
- Solr backend class
- $config : PluginManager
- VuFind configuration reader
- $connectorClass : string
- Solr connector class
- $defaultIndexName : string
- Solr index name (used as default if $this->indexNameSetting is unset in the config).
- $facetConfig : string
- Facet configuration file identifier.
- $indexNameSetting : string
- Name of index configuration setting to use to retrieve Solr index name (core or collection).
- $logger : LoggerInterface
- Logger.
- $mainConfig : string
- Primary configuration file identifier.
- $mergedIndexConfig : array<string|int, mixed>|null
- Merged index configuration
- $recordCollectionClass : string
- Record collection class for RecordCollectionFactory
- $recordCollectionFactoryClass : string
- Record collection factory class
- $searchConfig : string
- Search configuration file identifier.
- $searchYaml : string
- YAML searchspecs filename.
- $serviceLocator : ContainerInterface
- Service manager
- $uniqueKey : string
- Solr field used to store unique identifiers
- __construct() : mixed
- Constructor
- __invoke() : Backend
- Create service
- getService() : T
- Retrieve a service
- setup() : void
- Initialize the factory
- createBackend() : Backend
- Create the SOLR backend.
- createConnector() : Connector
- Create the SOLR connector.
- createConnectorCache() : StorageInterface|null
- Create cache for the connector if enabled in configuration
- createHttpClient() : Client
- Create HTTP Client
- createListeners() : void
- Create listeners.
- createLuceneSyntaxHelper() : LuceneSyntaxHelper
- Create Lucene syntax helper.
- createQueryBuilder() : QueryBuilder
- Create the query builder.
- createRecordCollectionFactory() : RecordCollectionFactoryInterface
- Create the record collection factory.
- createSimilarBuilder() : SimilarBuilder
- Create the similar records query builder.
- getCreateRecordCallback() : callable|null
- Get the callback for creating a record.
- getCustomFilterListener() : mixed
- Get a custom filter listener for the backend (or null if not needed).
- getDeduplicationListener() : DeduplicationListener
- Get a deduplication listener for the backend
- getDefaultParametersListener() : DeduplicationListener
- Get a default parameters listener for the backend
- getFlatIndexConfig() : array<string|int, mixed>
- Get the Index section of the highest-priority configuration file (for use in cases where fallback is not desired).
- getHiddenFilters() : array<string|int, mixed>
- Get all hidden filter settings.
- getHideFacetValueListener() : mixed
- Get a hide facet value listener for the backend
- getHierarchicalFacetListener() : HierarchicalFacetListener
- Get a hierarchical facet listener for the backend
- getHttpOptions() : array<string|int, mixed>
- Get HTTP options for the client
- getIndexConfig() : mixed
- Get an index-related configuration setting.
- getIndexName() : string
- Get the name of the Solr index (core or collection).
- getInjectConditionalFilterListener() : InjectConditionalFilterListener
- Get a Conditional Filter Listener
- getInjectHighlightingListener() : InjectHighlightingListener
- Get a highlighting listener for the backend
- getMergedIndexConfig() : array<string|int, mixed>
- Merge together the Index sections of all eligible configuration files and return the result as an array.
- getPrioritizedConfigsForIndexSettings() : array<string|int, string>
- Return an ordered array of configurations to check for index configurations.
- getSolrBaseUrls() : array<string|int, string>
- Get the Solr base URL(s) (without the path to the specific index)
- getSolrUrl() : string|array<string|int, mixed>
- Get the full Solr URL(s) (including index path part).
- loadSpecs() : array<string|int, mixed>
- Load the search specs.
Properties
$allowFallbackForIndexName
When looking up the Solr index name config setting, should we allow fallback into the main configuration (true), or limit ourselves to the search config (false)?
protected
bool
$allowFallbackForIndexName
= false
$backendClass
Solr backend class
protected
string
$backendClass
= \VuFindSearch\Backend\Solr\Backend::class
$config
VuFind configuration reader
protected
PluginManager
$config
$connectorClass
Solr connector class
protected
string
$connectorClass
= \VuFindSearch\Backend\Solr\Connector::class
$defaultIndexName
Solr index name (used as default if $this->indexNameSetting is unset in the config).
protected
string
$defaultIndexName
= ''
$facetConfig
Facet configuration file identifier.
protected
string
$facetConfig
$indexNameSetting
Name of index configuration setting to use to retrieve Solr index name (core or collection).
protected
string
$indexNameSetting
= 'default_core'
$logger
Logger.
protected
LoggerInterface
$logger
$mainConfig
Primary configuration file identifier.
protected
string
$mainConfig
= 'config'
$mergedIndexConfig
Merged index configuration
protected
array<string|int, mixed>|null
$mergedIndexConfig
= null
$recordCollectionClass
Record collection class for RecordCollectionFactory
protected
string
$recordCollectionClass
= \VuFindSearch\Backend\Solr\Response\Json\RecordCollection::class
$recordCollectionFactoryClass
Record collection factory class
protected
string
$recordCollectionFactoryClass
= \VuFindSearch\Backend\Solr\Response\Json\RecordCollectionFactory::class
$searchConfig
Search configuration file identifier.
protected
string
$searchConfig
$searchYaml
YAML searchspecs filename.
protected
string
$searchYaml
$serviceLocator
Service manager
protected
ContainerInterface
$serviceLocator
$uniqueKey
Solr field used to store unique identifiers
protected
string
$uniqueKey
= 'id'
Methods
__construct()
Constructor
public
__construct() : mixed
Return values
mixed —__invoke()
Create service
public
__invoke(ContainerInterface $sm, string $name[, array<string|int, mixed> $options = null ]) : Backend
Parameters
- $sm : ContainerInterface
-
Service manager
- $name : string
-
Requested service name
- $options : array<string|int, mixed> = null
-
Extra options (unused)
Tags
Return values
Backend —getService()
Retrieve a service
public
getService(class-string<\VuFind\Service\T> $name) : T
Parameters
- $name : class-string<\VuFind\Service\T>
-
Name of service to retrieve
Tags
Return values
T —setup()
Initialize the factory
public
setup(ContainerInterface $sm) : void
Parameters
- $sm : ContainerInterface
-
Service manager
Return values
void —createBackend()
Create the SOLR backend.
protected
createBackend(Connector $connector) : Backend
Parameters
- $connector : Connector
-
Connector
Return values
Backend —createConnector()
Create the SOLR connector.
protected
createConnector() : Connector
Return values
Connector —createConnectorCache()
Create cache for the connector if enabled in configuration
protected
createConnectorCache(Config $searchConfig) : StorageInterface|null
Parameters
- $searchConfig : Config
-
Search configuration
Return values
StorageInterface|null —createHttpClient()
Create HTTP Client
protected
createHttpClient([int $timeout = null ][, array<string|int, mixed> $options = [] ][, string $url = null ]) : Client
Parameters
- $timeout : int = null
-
Request timeout
- $options : array<string|int, mixed> = []
-
Other options
- $url : string = null
-
Request URL (needed for proper local address check when the client is being proxified)
Return values
Client —createListeners()
Create listeners.
protected
createListeners(Backend $backend) : void
Parameters
- $backend : Backend
-
Backend
Return values
void —createLuceneSyntaxHelper()
Create Lucene syntax helper.
protected
createLuceneSyntaxHelper() : LuceneSyntaxHelper
Return values
LuceneSyntaxHelper —createQueryBuilder()
Create the query builder.
protected
createQueryBuilder() : QueryBuilder
Return values
QueryBuilder —createRecordCollectionFactory()
Create the record collection factory.
protected
createRecordCollectionFactory() : RecordCollectionFactoryInterface
Return values
RecordCollectionFactoryInterface —createSimilarBuilder()
Create the similar records query builder.
protected
createSimilarBuilder() : SimilarBuilder
Return values
SimilarBuilder —getCreateRecordCallback()
Get the callback for creating a record.
protected
getCreateRecordCallback() : callable|null
Returns a callable or null to use RecordCollectionFactory's default method.
Return values
callable|null —getCustomFilterListener()
Get a custom filter listener for the backend (or null if not needed).
protected
getCustomFilterListener(BackendInterface $backend, Config $facet) : mixed
Parameters
- $backend : BackendInterface
-
Search backend
- $facet : Config
-
Configuration of facets
Return values
mixed —null|CustomFilterListener
getDeduplicationListener()
Get a deduplication listener for the backend
protected
getDeduplicationListener(Backend $backend, bool $enabled) : DeduplicationListener
Parameters
- $backend : Backend
-
Search backend
- $enabled : bool
-
Whether deduplication is enabled
Return values
DeduplicationListener —getDefaultParametersListener()
Get a default parameters listener for the backend
protected
getDefaultParametersListener(Backend $backend, array<string|int, mixed> $params) : DeduplicationListener
Parameters
- $backend : Backend
-
Search backend
- $params : array<string|int, mixed>
-
Default parameters
Return values
DeduplicationListener —getFlatIndexConfig()
Get the Index section of the highest-priority configuration file (for use in cases where fallback is not desired).
protected
getFlatIndexConfig() : array<string|int, mixed>
Return values
array<string|int, mixed> —getHiddenFilters()
Get all hidden filter settings.
protected
getHiddenFilters() : array<string|int, mixed>
Return values
array<string|int, mixed> —getHideFacetValueListener()
Get a hide facet value listener for the backend
protected
getHideFacetValueListener(BackendInterface $backend, Config $facet) : mixed
Parameters
- $backend : BackendInterface
-
Search backend
- $facet : Config
-
Configuration of facets
Return values
mixed —null|HideFacetValueListener
getHierarchicalFacetListener()
Get a hierarchical facet listener for the backend
protected
getHierarchicalFacetListener(BackendInterface $backend) : HierarchicalFacetListener
Parameters
- $backend : BackendInterface
-
Search backend
Return values
HierarchicalFacetListener —getHttpOptions()
Get HTTP options for the client
protected
getHttpOptions(string $url) : array<string|int, mixed>
Parameters
- $url : string
-
URL being requested
Tags
Return values
array<string|int, mixed> —getIndexConfig()
Get an index-related configuration setting.
protected
getIndexConfig(string $setting[, mixed $default = null ][, bool $fallback = true ]) : mixed
Parameters
- $setting : string
-
Name of setting
- $default : mixed = null
-
Default value if unset
- $fallback : bool = true
-
Should we fall back to main config if the setting is absent from the search config file?
Return values
mixed —getIndexName()
Get the name of the Solr index (core or collection).
protected
getIndexName() : string
Return values
string —getInjectConditionalFilterListener()
Get a Conditional Filter Listener
protected
getInjectConditionalFilterListener(BackendInterface $backend, Config $search) : InjectConditionalFilterListener
Parameters
- $backend : BackendInterface
-
Search backend
- $search : Config
-
Search configuration
Return values
InjectConditionalFilterListener —getInjectHighlightingListener()
Get a highlighting listener for the backend
protected
getInjectHighlightingListener(BackendInterface $backend, Config $search) : InjectHighlightingListener
Parameters
- $backend : BackendInterface
-
Search backend
- $search : Config
-
Search configuration
Return values
InjectHighlightingListener —getMergedIndexConfig()
Merge together the Index sections of all eligible configuration files and return the result as an array.
protected
getMergedIndexConfig() : array<string|int, mixed>
Return values
array<string|int, mixed> —getPrioritizedConfigsForIndexSettings()
Return an ordered array of configurations to check for index configurations.
protected
getPrioritizedConfigsForIndexSettings() : array<string|int, string>
Return values
array<string|int, string> —getSolrBaseUrls()
Get the Solr base URL(s) (without the path to the specific index)
protected
getSolrBaseUrls() : array<string|int, string>
Return values
array<string|int, string> —getSolrUrl()
Get the full Solr URL(s) (including index path part).
protected
getSolrUrl() : string|array<string|int, mixed>
Return values
string|array<string|int, mixed> —loadSpecs()
Load the search specs.
protected
loadSpecs() : array<string|int, mixed>