-
Notifications
You must be signed in to change notification settings - Fork 999
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
implement GEOSEARCH #1879
Comments
Hi Romange, I can start by implementing It appears that "georadiusbymember" and "GEORADIUS" are also under construction. Do I need to worry about confliction? I'd appreciate it if you could give me more advice on the implementation. I'll do more research as well. |
@azuredream thanks ! you can also work on #1548 if you prefer - noone is working on it right now. |
You should look at other GEO functions that are already implemented in zset_family.cc to see how the code is structured. Usually we have a separate function for parsing and handling all the arguments and a function that actually performs the data structure operations. The reason for this is that these functions run in possibly diferrent threads due to our shared nothing multi-threaded architecture. |
I've taken a thorough look at the GEOADD and GEOSEARCH implementations in Redis, as well as what Dragonfly has currently. |
geo.c and geo.h is redis code and we should use it if possible. If not possible we should write our own code. |
Thanks for your reply. I spend some time to understand GeoSearch and its Redis implementation I can write a Draft PR if you want to keep tracking the progress, but not sure if it make sense to push untested code. |
Thanks, please note you probably need to start rewriting |
Hi, I ran into some challenges, particularly with the zset search process. I'd appreciate your input before proceeding:
|
Can you provide a pointer to the reference implementation in redis that does (1) and (3) ? Because, for example, with (3), I think (not sure), that zset score is in fact the location, so it should be enough to extract xy[]. Then it should be possible to compute the distance if you have xy[] and the reference point of the query. So given ScoredArray you should be able to derive other fields. Again i am guessing here because i have not looked at the reference code. |
Please refer to The difference between the fetched superset and the actual result set can be significant. In the worst case, the fetched data can be 64 times larger than the actual desired result. This happens because if the Why we need 8 neighbors while the central box is larger than the result? Because the src node not always at the center of a Geohash box. Plus, if |
I totally agree that this is less efficient but it seems like the "trivial" solution won't include any throw away work, therefore it can be considered as an intermediate step to what you have in mind. Meanwhile you will add all other missing pieces, plus tests. It's a lot of code. After the "trivial" PR will be merged we will continue with performance improvements and add specialized functions. |
Fixed via #2070 |
see https://redis.io/commands/geosearch/
The text was updated successfully, but these errors were encountered: