GeoDistanceSearchQuery
in package
implements
JsonSerializable, SearchQuery
A FTS query that finds all matches from a given location (point) within the given distance.
Both the point and the distance are required.
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
- $distance : string
- $field : string|null
- $latitude : float
- $longitude : float
- __construct() : mixed
- boost() : GeoDistanceSearchQuery
- Sets the boost for this query.
- build() : GeoDistanceSearchQuery
- Static helper to keep code more readable
- field() : GeoDistanceSearchQuery
- Sets the field for this query.
Properties
$boost
private
float|null
$boost
= null
$distance
private
string
$distance
$field
private
string|null
$field
= null
$latitude
private
float
$latitude
$longitude
private
float
$longitude
Methods
__construct()
public
__construct(float $longitude, float $latitude[, string|null $distance = null ]) : mixed
Parameters
- $longitude : float
- $latitude : float
- $distance : string|null = null
Tags
Return values
mixed —boost()
Sets the boost for this query.
public
boost(float $boost) : GeoDistanceSearchQuery
Parameters
- $boost : float
-
the boost value to use.
Tags
Return values
GeoDistanceSearchQuery —build()
Static helper to keep code more readable
public
static build(float $longitude, float $latitude[, string|null $distance = null ]) : GeoDistanceSearchQuery
Parameters
- $longitude : float
- $latitude : float
- $distance : string|null = null
Tags
Return values
GeoDistanceSearchQuery —field()
Sets the field for this query.
public
field(string $field) : GeoDistanceSearchQuery
Parameters
- $field : string
-
the field to use.