API Reference / API Parameters / aroundPrecision
Jan. 07, 2019


Type: integer
Engine default: 1
Parameter syntax
'aroundPrecision' => number_of_meters

Can be used in these methods:

About this parameter

Precision of geo search (in meters), to add grouping by geo location to the ranking formula.

When ranking hits, geo distances are grouped into ranges of aroundPrecision size. All hits within the same range are considered equal with respect to the geo ranking parameter.

For example, if you set aroundPrecision to 100, any two objects lying in the range [0, 99m] from the searched location will be considered equal; same for [100, 199], [200, 299], etc.

Usage notes:

  • For this setting to have any effect, the geo criterion must be included in your ranking formula (which is the case by default).


Set geo search precision

$results = $index->search('query', [
  'aroundPrecision' => 100 // 100 meters precision

Did you find this page helpful?