TermRangeSearchQuery
in package
implements
JsonSerializable, SearchQuery
A FTS query that matches documents on a range of values. At least one bound is required, and the inclusiveness of each bound can be configured.
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
- $field : string|null
- $inclusiveMax : bool|null
- $inclusiveMin : bool|null
- $max : string|null
- $min : string|null
- boost() : TermRangeSearchQuery
- Sets the boost for this query.
- build() : TermRangeSearchQuery
- Static helper to keep code more readable
- field() : TermRangeSearchQuery
- Sets the field for this query.
- max() : TermRangeSearchQuery
- Sets the upper boundary of the range, inclusive or not depending on the second parameter.
- min() : TermRangeSearchQuery
- Sets the lower boundary of the range, inclusive or not depending on the second parameter.
Properties
$boost
private
float|null
$boost
= null
$field
private
string|null
$field
= null
$inclusiveMax
private
bool|null
$inclusiveMax
= null
$inclusiveMin
private
bool|null
$inclusiveMin
= null
$max
private
string|null
$max
= null
$min
private
string|null
$min
= null
Methods
boost()
Sets the boost for this query.
public
boost(float $boost) : TermRangeSearchQuery
Parameters
- $boost : float
-
the boost value to use.
Tags
Return values
TermRangeSearchQuery —build()
Static helper to keep code more readable
public
static build() : TermRangeSearchQuery
Tags
Return values
TermRangeSearchQuery —field()
Sets the field for this query.
public
field(string $field) : TermRangeSearchQuery
Parameters
- $field : string
-
the field to use.
Tags
Return values
TermRangeSearchQuery —max()
Sets the upper boundary of the range, inclusive or not depending on the second parameter.
public
max(string $max[, bool $inclusive = false ]) : TermRangeSearchQuery
Parameters
- $max : string
-
the upper boundary of the range.
- $inclusive : bool = false
-
whether the upper boundary should be inclusive.
Tags
Return values
TermRangeSearchQuery —min()
Sets the lower boundary of the range, inclusive or not depending on the second parameter.
public
min(string $min[, bool $inclusive = true ]) : TermRangeSearchQuery
Parameters
- $min : string
-
the lower boundary of the range.
- $inclusive : bool = true
-
whether the lower boundary should be inclusive.