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
$boostTerms
Terms that are going to be boosted
protected
array<string|int, mixed>
$boostTerms
= []
$query
BaseQuery that is going to be executed
protected
BaseQuery
$query
$queryArray
Query set that has been executed
protected
array<string|int, mixed>
$queryArray
= []
Methods
getBoostTerms()
Get the boosted terms
public
getBoostTerms() : array<string|int, mixed>
Return values
array<string|int, mixed>getQueryArray()
Any class using this needs getQueryArray
public
abstract getQueryArray() : mixed
setBoostTerms()
Set the boosted terms manually
public
setBoostTerms(array<string|int, mixed> $boostTerms) : QueryComponentFactory
Parameters
- $boostTerms : array<string|int, mixed>
Return values
QueryComponentFactorybuildBoosts()
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>