Key points
This post is a detailed report (originally a styled HTML page with diagrams) on integrating RediSearch with Go's open-source GIS ecosystem.
1. RediSearch core technology
- RediSearch is an official Redis module that extends Redis into a full search engine with full-text search, secondary indexes, and complex queries.
- Its memory-first architecture, based on inverted indexes, enables sub-millisecond query latency — ideal for real-time applications.
- Geospatial support includes two field types:
GEO: indexes simple coordinate pointsGEOSHAPE: supports complex geometries in WKT format- Other features: phrase/exact/fuzzy/boolean full-text search, aggregation and real-time analytics, autocomplete, vector search, and weighting.
- Performance strategies highlighted: memory optimization, index compression, and query caching.
- Basic geometry processing:
go-geom,GeoOS,go-spatial/geom - Coordinate projection/conversion:
go-spatial/proj, WGS84 handling,go-geos - Spatial indexing:
go-geoindex,H3-Go(Uber H3 bindings),gismanager - High performance: compiled language, native goroutine concurrency, optimized garbage collection.
- Deployment: static binaries with no dependencies, lightweight container images, fast startup and scaling.
- GIS libraries (go-geom, GeoOS, coordinate conversion) for data preparation
- A RediSearch client writing to a Redis server with the RediSearch module (GEO and GEOSHAPE indexes) and the RedisJSON module (JSON documents)
2. RediSearch vs. Elasticsearch
| Dimension | RediSearch | Elasticsearch | |---|---|---| | Architecture | Memory-first, sub-ms latency | Disk-first, distributed | | Query performance (cited benchmark) | ~12.5K ops/sec | ~3.1K ops/sec | | Geospatial | GEO, GEOSHAPE (WKT) | geo_point, geo_shape, rich queries | | Scalability | Relies on Redis Cluster, more manual config | Native distribution, auto scaling | | Ecosystem | Redis ecosystem, real-time strengths | ELK Stack, complete solution |