Hi everyone, I’m trying to replicate a clustering behavior similar to PostGIS in Typesense. I have a dataset of documents with lat/lng, and I want to group (cluster) results by proximity to a given point (lat/lng) within a defined radius.
For example, cluster all points within 5km of each other around a reference point.
The idea is to generate a set of geographic buckets or clusters, each containing nearby points, and then get a count of documents per cluster (or even centroid + count if possible).
Typesense allows sorting and filtering with _geo_point, but I haven’t found a way to group or cluster by geographic proximity dynamically. Is this possible natively in Typesense? Or do I need to run a geo-clustering algorithm externally to pre compute or even doing the job after retrieving results?
Thanks in advance for your input !
Any pattern or workaround you’ve used would be great to hear.