Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support GEO search #4536

Open
BagritsevichStepan opened this issue Jan 30, 2025 · 0 comments
Open

Support GEO search #4536

BagritsevichStepan opened this issue Jan 30, 2025 · 0 comments
Assignees
Labels
bug Something isn't working minor nice to have enhancement

Comments

@BagritsevichStepan
Copy link
Contributor

We need to support GEO search as requested here.

For example:

127.0.0.1:6379> HSET place:1 name "Eiffel Tower" location "2.2945,48.8584"
(integer) 2
127.0.0.1:6379> HSET place:2 name "Louvre Museum" location "2.3358,48.8606"
(integer) 2
127.0.0.1:6379> HSET place:3 name "Notre-Dame" location "2.3499,48.8529"
(integer) 2
127.0.0.1:6379> FT.CREATE index ON HASH PREFIX 1 "place:" SCHEMA name TEXT location GEO 
OK
127.0.0.1:6379> FT.SEARCH index "*" GEOFILTER location 2.2945 48.8584 5 km
1) (integer) 3
2) "place:1"
3) 1) "name"
   2) "Eiffel Tower"
   3) "location"
   4) "2.2945,48.8584"
4) "place:2"
5) 1) "name"
   2) "Louvre Museum"
   3) "location"
   4) "2.3358,48.8606"
6) "place:3"
7) 1) "name"
   2) "Notre-Dame"
   3) "location"
   4) "2.3499,48.8529"
@BagritsevichStepan BagritsevichStepan added bug Something isn't working minor nice to have enhancement labels Jan 30, 2025
@BagritsevichStepan BagritsevichStepan self-assigned this Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working minor nice to have enhancement
Projects
None yet
Development

No branches or pull requests

1 participant