-
Notifications
You must be signed in to change notification settings - Fork 23.8k
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
Will the GEORADIUS support pagination? #3019
Comments
Pagination would be a critical feature for it to be used in "store locator" like applications |
Hello, using a This way one could model something like:
The next calls will use |
The Some new |
Makes sense @bpo. However while trying to design this better I stepped into an issue. The good thing about this, is that the result of Otherwise the STORE command should take options to use the distance as score, and encode the resulting elements as, Json or alike? |
What if In many cases I think people would be ok with discarding the geo index in this operation, as they will still retain the original geo-encoded zset to look up element locations with - when iterating based on proximity, for example. |
@bpo the problem is that we have just a score and an element, how to encode distance and other stuff? Or do you mean we could output multiple keys, one for Btw your observations made me think that, usually, when you paginate you don't need location (you need that when plotting on a map), but element name, so the fact you can't paginate while having the lat/long info is not terrible perhaps. However in order to start with a general API, I would probably support
And so forth. We could start with just a single store, and improve this over time. |
@antirez that sounds great to me. I meant to suggest multiple outputs, something like
or
It's clearer to start with a single option as you have suggested. One could always use |
Thanks @bpo, totally makes sense, while writing the above comment I removed / retyped it multiple times since can't decide about
Looks more Redis-ish? |
I would be very happy with those options for storage. Reviewing the whole command - what do the |
@bpo they would syntaxerr. Are you suggesting to overload those options to switch output? I thought about this, the problem I see is that Alternatively, it is possible to implement it so that when no |
@antirez A syntax error there makes sense to me - I think it gets too confusing to use |
This is fabulous! I like the STORE and STOREDIST approach. In my use case, I'm doing an intersection of a GEORADIUS call with an unordered set. Might it be possible to also add STORESET ? |
@CloudMarc I think you have a solution already, fortunately
|
Thanks for your focus. It is a awesome solutions for me. It will simplify my implement actually. By the way, in my use case, I need certain quantity of members. I am wondering how to determine radius appropriately for ensuring performance due to population distribution. |
We have an implementation into |
You can perform either |
You right! Good idea to trow an error. |
on unstable as of today, GEORADIUS with STORE followed by ZINTERSTORE works great, saves me lots of round trips - Thanks! |
redis 3.2.0 version has been released geographic indexing function, have This feature been out of beta ? can i use it in a production environment? |
Yes.
|
I noticed this issue was still open. I had a few questions:
I've used Redis before but never had the need to dive into the code/write more advanced queries. I'm not good at C++ but i'd be willing to try to do a pull-request to add some of this stuff. |
Which type of coordinate system is used by redis? wgs84? or someting else? |
any news on this? |
Related to issue redis#3019.
Closing as this was already handled. |
It doesn't make much of a difference, especially if you don't use
If
Good point. I think this has since been done. |
I wonder if GEORADIUS would support pagination?
something like providing
skip
parameter:If I use the geo commands in a wrong way, let me know and please don't mind.
Look forward to your kind reply.
The text was updated successfully, but these errors were encountered: