Documentation

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

Methods

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
throws
InvalidArgumentException
since
4.0.0
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
Tags
throws
InvalidArgumentException
since
4.0.0
Return values
DateRangeSearchQuery

        

Search results