class DateRangeSearchFacet implements JsonSerializable, SearchFacet (View source)

A facet that categorizes hits inside date ranges (or buckets) provided by the user.

Methods

mixed
jsonSerialize()

Specify data which should be serialized to JSON

__construct(string $field, int $limit)

No description

addRange(string $name, int|string $start = null, int|string $end = null)

No description

Details

mixed jsonSerialize()

Specify data which should be serialized to JSON

Return Value

mixed

data which can be serialized by json_encode, which is a value of any type other than a resource.

__construct(string $field, int $limit)

No description

Parameters

string $field
int $limit

DateRangeSearchFacet addRange(string $name, int|string $start = null, int|string $end = null)

No description

Parameters

string $name
int|string $start
int|string $end

Return Value

DateRangeSearchFacet