RedisGeoUnit.Miles typo should be “mi” not “mo”. Also you can’t pass in the correct “mi” b/c there is a check.
https://redis.io/commands/georadius
ErrorCode
RedisResponseException
Message
unsupported unit provided. please use m, km, ft, mi
namespace ServiceStack.Redis
{
public static class RedisGeoUnit
{
public const string Meters = "m";
public const string Kilometers = "km";
public const string Miles = "mo";
public const string Feet = "ft";
}
}
There is also a check on the unit passed in is valid so you can’t pass in "mi"
as a param.
ErrorCode
NotSupportedException
Message
Unit 'mi' is not a valid unit
Stack Trace
[Near: 2/8/2019 8:19:49 PM]: [REQUEST:
{lat:XXXX,lng:-XX}] System.NotSupportedException: Unit 'mi' is not a
valid unit at ServiceStack.Redis.Commands.GetUnit(String unit) at
ServiceStack.Redis.RedisNativeClient.GeoRadius(String key, Double longitude,
Double latitude, Double radius, String unit, Boolean withCoords, Boolean
withDist, Boolean withHash, Nullable`1 count, Nullable`1 asc) at
ServiceStack.Redis.RedisClient.FindGeoResultsInRadius(String key, Double
longitude, Double latitude, Double radius, String unit, Nullable`1 count,
Nullable`1 sortByNearest) at …