The problem/use-case that the feature addresses
I would love to be able to filter by geo location with the new vector sets datatype using latitude/longitude and a distance radius.
Comment From: furmak331
I ve been exploring the vector sets module and core files like vset.c and vset_config.c. I think we could extend vector entries to include lat/lon metadata and apply GEO filtering during queries. I’d be happy to prototype this . let me know if there’s a preferred direction or design spec to follow. I might need some guidance along the way, so any help would be appreciated
Comment From: enigmadrm
I think we can just follow the spec that's already in use in the old RediSearch module:
https://redis.io/docs/latest/develop/ai/search-and-query/query/geo-spatial/
Comment From: furmak331
@sundb @enigmadrm I've been examining the existing Redis geospatial implementation and would love to contribute to this feature.
I went through the RediSearch geo modules (geo_index.c/geo_index.h) and found they implement:
GeoFilter struct with lat/lon/radius/unit support
Parsing syntax: <property> LONG LAT DIST m|km|ft|mi
Distance calculation via isWithinRadius() and geohash encoding
Support for multiple units (m/km/ft/mi) with proper conversion
current filtering is .year > 1950
I think we could extend the Vector Sets filter expression parser to support something like: GEO_DISTANCE(.lat, .lng, target_lat, target_lng) < radius_meters
Rather than rebuilding geo functionality, we could extend the existing Vector Sets filter expression parser to support geospatial functions.
This way we can reuse the existing geo infrastructure (calcGeoHash, isWithinRadius, validation) rather than rebuilding it, and it integrates with the JSON attribute system.
Thoughts?