RandomRecommend
in package
implements
RecommendInterface
RandomRecommend Module
This class provides random recommendations based on the Solr random field
Originally developed by Luke O'Sullivan at Swansea University.
Tags
Interfaces, Classes, Traits and Enums
- RecommendInterface
- Search Recommendations Interface
Table of Contents
- $backend : string
- Backend to use
- $displayMode : string
- Display Mode
- $filters : array<string|int, mixed>
- Filters
- $limit : int
- Results Limit
- $minimum : number
- Result Set Minimum
- $mode : string
- Mode
- $paramManager : PluginManager
- Params manager
- $results : array<string|int, mixed>
- Results
- $searchService : Service
- Search Service
- $settings : string
- Settings from configuration
- __construct() : mixed
- Constructor
- getDisplayMode() : string
- Get Display Mode
- getResults() : array<string|int, mixed>
- Get Results
- init() : void
- Called before the Search Results object performs its main search (specifically, in response to \VuFind\Search\SearchRunner::EVENT_CONFIGURED).
- process() : void
- Called after the Search Results object has performed its main search. This may be used to extract necessary information from the Search Results object or to perform completely unrelated processing.
- setConfig() : void
- Store the configuration of the recommendation module.
Properties
$backend
Backend to use
protected
string
$backend
= 'Solr'
$displayMode
Display Mode
protected
string
$displayMode
= 'standard'
$filters
Filters
protected
array<string|int, mixed>
$filters
= []
$limit
Results Limit
protected
int
$limit
= 10
$minimum
Result Set Minimum
protected
number
$minimum
= 0
$mode
Mode
protected
string
$mode
= 'retain'
$paramManager
Params manager
protected
PluginManager
$paramManager
$results
Results
protected
array<string|int, mixed>
$results
$searchService
Search Service
protected
Service
$searchService
$settings
Settings from configuration
protected
string
$settings
Methods
__construct()
Constructor
public
__construct(Service $searchService, PluginManager $paramManager) : mixed
Parameters
- $searchService : Service
-
VuFind Search Service
- $paramManager : PluginManager
-
Params manager
Return values
mixed —getDisplayMode()
Get Display Mode
public
getDisplayMode() : string
Return values
string —getResults()
Get Results
public
getResults() : array<string|int, mixed>
Return values
array<string|int, mixed> —init()
Called before the Search Results object performs its main search (specifically, in response to \VuFind\Search\SearchRunner::EVENT_CONFIGURED).
public
init(Params $params, Parameters $request) : void
This method is responsible for setting search parameters needed by the recommendation module and for reading any existing search parameters that may be needed.
Parameters
- $params : Params
-
Search parameter object
- $request : Parameters
-
Parameter object representing user request.
Return values
void —process()
Called after the Search Results object has performed its main search. This may be used to extract necessary information from the Search Results object or to perform completely unrelated processing.
public
process(Results $results) : void
Parameters
- $results : Results
-
Search results object
Return values
void —setConfig()
Store the configuration of the recommendation module.
public
setConfig(string $settings) : void
Parameters
- $settings : string
-
Settings from searches.ini.