DateRangeSearchQuery
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
- $datetimeParser : string|null
- $end : string|null
- $field : string|null
- $inclusiveEnd : bool|null
- $inclusiveStart : bool|null
- $start : string|null
- boost() : DateRangeSearchQuery
- Sets the boost for this query.
- build() : DateRangeSearchQuery
- Static helper to keep code more readable
- datetimeParser() : DateRangeSearchQuery
- Sets the name of the date/time parser to use to interpret start/end.
- end() : DateRangeSearchQuery
- Sets the upper boundary of the range, inclusive or not depending on the second parameter.
- field() : DateRangeSearchQuery
- Sets the field for this query.
- start() : DateRangeSearchQuery
- Sets the lower boundary of the range, inclusive or not depending on the second parameter.
Properties
$boost
private
float|null
$boost
= null
$datetimeParser
private
string|null
$datetimeParser
= null
$end
private
string|null
$end
= null
$field
private
string|null
$field
= null
$inclusiveEnd
private
bool|null
$inclusiveEnd
= null
$inclusiveStart
private
bool|null
$inclusiveStart
= null
$start
private
string|null
$start
= null
Methods
boost()
Sets the boost for this query.
public
boost(float $boost) : DateRangeSearchQuery
Parameters
- $boost : float
-
the boost value to use.
Tags
Return values
DateRangeSearchQuery —build()
Static helper to keep code more readable
public
static build() : DateRangeSearchQuery
Tags
Return values
DateRangeSearchQuery —datetimeParser()
Sets the name of the date/time parser to use to interpret start/end.
public
datetimeParser(string $parser) : DateRangeSearchQuery
Parameters
- $parser : string
-
the name of the parser.
Tags
Return values
DateRangeSearchQuery —end()
Sets the upper boundary of the range, inclusive or not depending on the second parameter.
public
end(int|string $end[, bool $inclusive = false ]) : DateRangeSearchQuery
Parameters
- $end : int|string
-
The strings will be taken verbatim and supposed to be formatted with custom date time formatter (see dateTimeParser). Integers interpreted as unix timestamps and represented as RFC3339 strings.
- $inclusive : bool = false
Tags
Return values
DateRangeSearchQuery —field()
Sets the field for this query.
public
field(string $field) : DateRangeSearchQuery
Parameters
- $field : string
-
the field to use.
Tags
Return values
DateRangeSearchQuery —start()
Sets the lower boundary of the range, inclusive or not depending on the second parameter.
public
start(int|string $start[, bool $inclusive = false ]) : DateRangeSearchQuery
Parameters
- $start : int|string
-
The strings will be taken verbatim and supposed to be formatted with custom date time formatter (see dateTimeParser). Integers interpreted as unix timestamps and represented as RFC3339 strings.
- $inclusive : bool = false