Skip to content

ZREVRANK: documentation is confusing. #2354

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

Closed
bharathalapati23 opened this issue Mar 15, 2023 · 9 comments
Closed

ZREVRANK: documentation is confusing. #2354

bharathalapati23 opened this issue Mar 15, 2023 · 9 comments

Comments

@bharathalapati23
Copy link

WITHSCORE is documented in ZREVRANK saying it is available from 7.2.0 but the latest stable version is 7.0.9. Also the examples are showing an error for WITHSCORE argument, most probably for the same reason.

This is a little bit confusing. Adding the latest stable version to history could solve this.

Would love to take this up. Let me know how to contribute as I'm not able to find history section in the codebase

@enjoy-binbin
Copy link
Contributor

Hi, this is expected. btw, Redis 7.2 RC1 will be release in the next week.

i think the history part has nothing to do with the stable version,
we should only need to care about the stuff inside the version.
btw, the history part code is stored in the redis code.
you think remove the WITHSCORE and the 7.2 from history will help?

@bharathalapati23
Copy link
Author

I think removing the WITHSCORE will definitely cause less confusion. But adding the current stable version to an FYI in history section would make way more sense in my opinion

@enjoy-binbin
Copy link
Contributor

get it. sadly, i think currently we won't remove the WITHSCORE.

@itamarhaber can you give some advices?

@itamarhaber
Copy link
Member

The root cause for the "problem" is the premature merge of #2227, which should have been done sometime after next week :)

That said, we've always had this issue with new commands/arguments that haven't been released yet and are introduced prematurely to the docs.
Regrettably, this always creates confusion, as in this case.

Going forward, I do want to have the interactive examples run against the nightly build to avoid this from happening.
Also, now that GitHub allows setting "latest" manually, I think we can pick stable using that and incorporate into the docs somehow.

@bharathalapati23
Copy link
Author

Hey I would love to do the incorporation of this latest build into the docs. Would love to take this up. Let me know how I could contribute here

@itamarhaber
Copy link
Member

@oranagra do you agree with ^:

Also, now that GitHub allows setting "latest" manually, I think we can pick stable using that and incorporate into the docs somehow.

@oranagra
Copy link
Member

i'm not certain i follow.
you wanna automatically show a bold hint in the "history" (and "since") section next to any line that mentions a version that's not released yet?
that sounds nice.

p.s. i don't think you can afford to run the interactive examples against the released version, it'll mean we can't merge docs PRs of new commands that are not released yet.
maybe we'll need to add some exception in some way...

@SoulPancake
Copy link

SoulPancake commented Apr 3, 2023

@oranagra Can you or someone suggest how the response for ZREVRANK WITHSCORE or ZRANK WITHSCORE must look like?
Need it for a separate implementation.
As the docs don't have the proper response in the example and show an error.

@itamarhaber
Copy link
Member

Hello @SoulPancake

Here you go:

127.0.0.1:6379> ZADD zset 1 a 2 b 3 c
(integer) 3
127.0.0.1:6379> ZRANK zset b WITHSCORE
1) (integer) 1
2) "2"
127.0.0.1:6379> HELLO 3
1# "server" => "redis"
2# "version" => "255.255.255"
3# "proto" => (integer) 3
4# "id" => (integer) 4
5# "mode" => "standalone"
6# "role" => "master"
7# "modules" => (empty array)
127.0.0.1:6379> ZRANK zset b WITHSCORE
1) (integer) 1
2) (double) 2

Mind you, you can run Redis 7.2-rc1 and check it out locally :)

@mich-elle-luna mich-elle-luna closed this as not planned Won't fix, can't repro, duplicate, stale Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants