QueryInterface
in
Table of Contents
Methods
- addFilter() : self
- addOrFilter() : self
- addTerm() : $this
- Add a term to search on.
- getFilters() : array<string|int, mixed>
- getOrFilters() : array<string|int, mixed>
- getTerms() : array<string|int, mixed>
- setFilters() : self
- setOrFilters() : self
- setTerms() : self
Methods
addFilter()
public
addFilter(string $key, string $value) : self
Parameters
- $key : string
- $value : string
Return values
selfaddOrFilter()
public
addOrFilter(string $key, string $value) : self
Parameters
- $key : string
- $value : string
Return values
selfaddTerm()
Add a term to search on.
public
addTerm(string $term[, array<string|int, mixed> $fields = [] ][, int $boost = 1 ][, float|bool|null $fuzzy = null ]) : $this
Note, each boosted query needs a separate addition! e.g. $this->addTerm('test', ['MyField', 'MyOtherField'], 3) followed by $this->addTerm('otherTest', ['Title'], 5);
If you want a generic boost on all terms, use addTerm only once, but boost on each field
The fields parameter is used to boost on
Parameters
- $term : string
-
Term to search for
- $fields : array<string|int, mixed> = []
-
fields to boost on
- $boost : int = 1
-
Boost value
- $fuzzy : float|bool|null = null
-
True or a value to the maximum amount of iterations
Return values
$thisgetFilters()
public
getFilters() : array<string|int, mixed>
Return values
array<string|int, mixed>getOrFilters()
public
getOrFilters() : array<string|int, mixed>
Return values
array<string|int, mixed>getTerms()
public
getTerms() : array<string|int, mixed>
Return values
array<string|int, mixed>setFilters()
public
setFilters(array<string|int, mixed> $filters) : self
Parameters
- $filters : array<string|int, mixed>
Return values
selfsetOrFilters()
public
setOrFilters(array<string|int, mixed> $filters) : self
Parameters
- $filters : array<string|int, mixed>
Return values
selfsetTerms()
public
setTerms(mixed $terms) : self
Parameters
- $terms : mixed