VuFind API Documentation

SimilarBuilder
in package
implements SimilarBuilderInterface

SOLR SimilarBuilder.

Tags
category

VuFind

author

Andrew S. Nagy vufind-tech@lists.sourceforge.net

author

David Maus maus@hab.de

author

Demian Katz demian.katz@villanova.edu

author

Ere Maijala ere.maijala@helsinki.fi

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link
https://vufind.org

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

Return values
ParamBag

Search results