SilverStripe solr Search

QueryComponentBoostTrait

Trait QueryComponentBoostTrait adds support for boosting to a QueryComponent

Table of Contents

Properties

$boostTerms  : array<string|int, mixed>
Terms that are going to be boosted
$query  : BaseQuery
BaseQuery that is going to be executed
$queryArray  : array<string|int, mixed>
Query set that has been executed

Methods

getBoostTerms()  : array<string|int, mixed>
Get the boosted terms
getQueryArray()  : mixed
Any class using this needs getQueryArray
setBoostTerms()  : QueryComponentFactory
Set the boosted terms manually
buildBoosts()  : void
Build the boosted field setup through Criteria
buildQueryBoost()  : array<string|int, mixed>
Set boosting at Query time

Properties

Methods

getBoostTerms()

Get the boosted terms

public getBoostTerms() : array<string|int, mixed>
Return values
array<string|int, mixed>

buildBoosts()

Build the boosted field setup through Criteria

protected buildBoosts() : void

Add the index-time boosting to the query

buildQueryBoost()

Set boosting at Query time

protected buildQueryBoost(array<string|int, mixed> $search, string $term, array<string|int, mixed> &$boostTerms) : array<string|int, mixed>
Parameters
$search : array<string|int, mixed>
$term : string
$boostTerms : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results