aroundRadius
"all"
null
'aroundRadius' => radius_in_meters|'all'
Can be used in these methods:
search,
browseObjects,
deleteBy,
searchForFacetValues,
generateSecuredApiKey,
addApiKey,
updateApiKey
search,
browse_objects,
delete_by,
search_for_facet_values,
generate_secured_api_key,
add_api_key,
update_api_key
search,
browseObjects,
deleteBy,
searchForFacetValues,
generateSecuredApiKey,
addApiKey,
updateApiKey
search,
browse_objects,
delete_by,
search_for_facet_values,
generate_secured_api_key,
add_api_key,
update_api_key
search,
browse,
deleteBy,
searchForFacetValues,
generateSecuredApiKey,
addAPIKey,
updateAPIKey
search,
browseObjects,
deleteObjectBy,
searchForFacetValues,
generateSecuredApiKey,
addApiKey,
updateApiKey
Search,
Browse,
DeleteBy,
SearchForFacetValues,
GenerateSecuredApiKey,
AddApiKey,
UpdateApiKey
Search,
browse,
deleteBy,
searchForFacetValues,
generateSecuredApiKey,
addApiKey,
updateApiKey
Search,
BrowseObjects,
DeleteBy,
SearchForFacetValues,
GenerateSecuredAPIKey,
AddAPIKey,
UpdateAPIKey
search,
browse index,
delete by,
search into facet values,
generateSecuredApiKey,
add key,
update key
About this parameter
Define the maximum radius for a geo search (in meters).
Usage notes
-
This setting only works within the context of a radial (circular) geo search, enabled by
aroundLatLngViaIP
oraroundLatLng
. -
How the radius is calculated:
-
If you specify the meters of the radius (instead of
all
), then only records that fall within the bounds of the circle (as defined by the radius) will be returned. Additionally, the ranking of the returned hits will be based on the distance from the central axis point. -
If you use
all
, there is no longer any filtering based on the radius. The engine returns all relevant results with a valid_geoloc
attribute. The ranking is still based on the distance from the central axis point. -
If you don’t use this setting, and yet perform a radial geo search (using aroundLatLngViaIP or aroundLatLng), the radius is automatically computed from the density of the searched area. See also
minimumAroundRadius
, which determines the minimum size of the radius.
-
-
For this setting to have any effect on your ranking, the geo criterion must be included in your ranking formula (which is the case by default).
Options
|
Integer value (in meters) representing the radius around the coordinates specified during the query. |
|
Disables the radius logic and returns all results with a valid |
Examples
Set manual radius filtering
1
2
3
$results = $index->search('query', [
'aroundRadius' => 1000 // 1km
]);
Disable automatic radius filtering
1
2
3
$results = $index->search('query', [
'aroundRadius' => 'all'
]);