SimilarBuilder
in package
implements
SimilarBuilderInterface
SOLR SimilarBuilder.
Tags
Interfaces, Classes, Traits and Enums
- SimilarBuilderInterface
- SOLR SimilarBuilder interface definition.
Table of Contents
- $count : int
- Number of similar records to retrieve
- $handlerParams : string
- MoreLikeThis Handler parameters
- $uniqueKey : string
- Solr field used to store unique identifier
- $useHandler : bool
- Whether to use MoreLikeThis Handler instead of the traditional MoreLikeThis component.
- __construct() : void
- Constructor.
- build() : ParamBag
- Return SOLR search parameters based on a record Id and params.
Properties
$count
Number of similar records to retrieve
protected
int
$count
= 5
$handlerParams
MoreLikeThis Handler parameters
protected
string
$handlerParams
= ''
$uniqueKey
Solr field used to store unique identifier
protected
string
$uniqueKey
$useHandler
Whether to use MoreLikeThis Handler instead of the traditional MoreLikeThis component.
protected
bool
$useHandler
= false
Methods
__construct()
Constructor.
public
__construct([Config $searchConfig = null ][, string $uniqueKey = 'id' ]) : void
Parameters
- $searchConfig : Config = null
-
Search config
- $uniqueKey : string = 'id'
-
Solr field used to store unique identifier
Return values
void —build()
Return SOLR search parameters based on a record Id and params.
public
build(string $id) : ParamBag
Parameters
- $id : string
-
Record Id