Skip to content

Commit d615e4c

Browse files
add resolution reference
1 parent 8e0f8d6 commit d615e4c

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

learn/filtering_and_sorting/geosearch.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ Use the [`filter` search parameter](/reference/api/search#filter) along with `_g
176176
### `_geoRadius`
177177

178178
```
179-
_geoRadius(lat, lng, distance_in_meters)
179+
_geoRadius(lat, lng, distance_in_meters, resolution)
180180
```
181181

182182
### `_geoBoundingBox`

reference/api/search.mdx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -488,13 +488,16 @@ If your documents contain `_geo` or `_geojson` data, you can use the following b
488488
<Tabs>
489489

490490
<Tab title="_geoRadius">
491-
`_geoRadius` establishes a circular area based on a central point and a radius. This filter rule requires three parameters: `lat`, `lng` and `distance_in_meters`.
491+
`_geoRadius` establishes a circular area based on a central point and a radius. This filter rule accepts the following parameters: `lat`, `lng`, `distance_in_meters`, `resolution`.
492492

493493
```json
494-
_geoRadius(lat, lng, distance_in_meters)
494+
_geoRadius(lat, lng, distance_in_meters, resolution)
495495
```
496496

497-
`lat` and `lng` should be geographic coordinates expressed as floating point numbers. `distance_in_meters` indicates the radius of the area within which you want your results and should be an integer.
497+
- `lat` and `lng` should be geographic coordinates expressed as floating point numbers.
498+
- `distance_in_meters` indicates the radius of the area within which you want your results and should be an integer.
499+
- `resolution` must be an integer between `3` and `1000` inclusive, and is an optional parameter. When using `_geojson` coordinates, `resolution` sets how many points Meilisearch will use to create a polygon that approximates the shape of a circle. Documents using `_geo` data ignore this parameter. Defaults to `125`. Increasing `resolution` may result in performance issues and is only necessary when dealing with large country-sized circles.
500+
498501

499502
<CodeSamplesGeosearchGuideFilterUsage1 />
500503

0 commit comments

Comments
 (0)