Documentation

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

Methods

__construct()

public __construct(float $longitude, float $latitude[, string|null $distance = null ]) : mixed
Parameters
$longitude : float
$latitude : float
$distance : string|null = null
Tags
since
4.0.0
Return values
mixed

        

Search results