To enable geo-searching, you must have geolocation data in your records as a _geoloc
attribute that contains latitude and longitude (lat
and lng
properties).
When indexing a record to Algolia that contains the _geoloc
attribute, you may encounter a 'geoloc attributes cannot contain numerical string' error. This error indicates that your _geoloc
attribute contains a numerical string value. The coordinates must be numbers, not strings.
For an example of how the _geoloc
attribute must be formatted, please refer to our guide on Enabling geo-search by adding geolocation data to records.