DisjunctionSearchQuery
in package
implements
JsonSerializable, SearchQuery
A compound FTS query that performs a logical OR between all its sub-queries (disjunction). It requires that a minimum of the queries match. The minimum is configurable (default 1).
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
- $min : int|null
- $queries : array<string|int, mixed>
- __construct() : mixed
- boost() : DisjunctionSearchQuery
- Sets the boost for this query.
- build() : DisjunctionSearchQuery
- Static helper to keep code more readable
- childQueries() : array<string|int, mixed>
- either() : DisjunctionSearchQuery
- min() : DisjunctionSearchQuery
- or() : DisjunctionSearchQuery
- Adds new predicate queries to this disjunction query.
Properties
$boost
private
float|null
$boost
= null
$min
private
int|null
$min
= null
$queries
private
array<string|int, mixed>
$queries
Methods
__construct()
public
__construct(array<string|int, mixed> $queries) : mixed
Parameters
- $queries : array<string|int, mixed>
Return values
mixed —boost()
Sets the boost for this query.
public
boost(float $boost) : DisjunctionSearchQuery
Parameters
- $boost : float
-
the boost value to use.
Tags
Return values
DisjunctionSearchQuery —build()
Static helper to keep code more readable
public
static build(array<string|int, mixed> $queries) : DisjunctionSearchQuery
Parameters
- $queries : array<string|int, mixed>
Tags
Return values
DisjunctionSearchQuery —childQueries()
public
childQueries() : array<string|int, mixed>
Return values
array<string|int, mixed> —either()
public
either(SearchQuery ...$queries) : DisjunctionSearchQuery
Parameters
- $queries : SearchQuery
Tags
Return values
DisjunctionSearchQuery —min()
public
min(int $min) : DisjunctionSearchQuery
Parameters
- $min : int
Tags
Return values
DisjunctionSearchQuery —or()
Adds new predicate queries to this disjunction query.
public
or(SearchQuery ...$queries) : DisjunctionSearchQuery
Parameters
- $queries : SearchQuery
-
the queries to add.