BooleanSearchQuery
in package
implements
JsonSerializable, SearchQuery
A compound FTS query that allows various combinations of sub-queries.
Interfaces, Classes, Traits and Enums
- JsonSerializable
- SearchQuery
- Common interface for all classes, which could be used as a body of SearchQuery
Table of Contents
- $boost : float|null
- $must : ConjunctionSearchQuery
- $mustNot : DisjunctionSearchQuery
- $should : DisjunctionSearchQuery
- __construct() : mixed
- boost() : BooleanSearchQuery
- Sets the boost for this query.
- build() : BooleanSearchQuery
- Static helper to keep code more readable
- min() : BooleanSearchQuery
- Sets the minimum value before that should query will boost.
- must() : BooleanSearchQuery
- Sets a query which must match.
- mustNot() : BooleanSearchQuery
- Sets a query which must not match.
- should() : BooleanSearchQuery
- Sets a query which must should match.
Properties
$boost
private
float|null
$boost
= null
$must
private
ConjunctionSearchQuery
$must
$mustNot
private
DisjunctionSearchQuery
$mustNot
$should
private
DisjunctionSearchQuery
$should
Methods
__construct()
public
__construct() : mixed
Return values
mixed —boost()
Sets the boost for this query.
public
boost(float $boost) : BooleanSearchQuery
Parameters
- $boost : float
-
the boost value to use.
Tags
Return values
BooleanSearchQuery —build()
Static helper to keep code more readable
public
static build() : BooleanSearchQuery
Tags
Return values
BooleanSearchQuery —min()
Sets the minimum value before that should query will boost.
public
min(int $minForShould) : BooleanSearchQuery
Parameters
- $minForShould : int
-
the minimum value before that should query will boost
Tags
Return values
BooleanSearchQuery —must()
Sets a query which must match.
public
must(ConjunctionSearchQuery $query) : BooleanSearchQuery
Parameters
- $query : ConjunctionSearchQuery
-
query which must match.
Tags
Return values
BooleanSearchQuery —mustNot()
Sets a query which must not match.
public
mustNot(DisjunctionSearchQuery $query) : BooleanSearchQuery
Parameters
- $query : DisjunctionSearchQuery
-
query which must not match.
Tags
Return values
BooleanSearchQuery —should()
Sets a query which must should match.
public
should(DisjunctionSearchQuery $query) : BooleanSearchQuery
Parameters
- $query : DisjunctionSearchQuery
-
query which should match.