This is a pretty basic example I put together based on the docs, but these commands yield zero search results...
FT.CREATE GeoTest SCHEMA name TEXT place GEO
FT.ADD GeoTest 158ce9ce941bce 1 FIELDS name Foo place Washington D.C. -77.0366 38.8977
FT.SEARCH GeoTest Foo GEOFILTER place -77.0366 38.8977 1 km
These are the keys the commands create...
1) "ft:GeoTest/foo"
2) "idx:GeoTest"
3) "158ce9ce941bce"
There should probably be a key called something like "geo:GeoTest/place", correct?
I think there's a problem in the way you are inserting - first of all, place can only be lon,lat. Second you need to quote multi word expressions. So it should be:
FT.ADD GeoTest 158ce9ce941bce 1 FIELDS name "Foo" place "-77.0366 38.8977"
If you want the place name add it in a different field.
That makes much more sense. Thanks!
@ethan-tr what language are you working with? Both Python and Java have clients that encapsulate those things for you.
I am putting together a PHP client - https://github.com/ethanhann/redisearch-php
Wow! looks awesome, very nice API! I'm very happy to see this. Mind if I share it?
Thanks. I feel like it it is coming together nicely. Feel free to share.
@ethan-tr totally awesome + double points for the documentation :100:
this is great