redis / redis-doc

Redis documentation source code for markdown and metadata files, conversion scripts, and so forth
Other
2.31k stars 1.72k forks source link

unknown command 'ZRANGEBYLEX' #659

Closed ramwin1 closed 8 years ago

ramwin1 commented 8 years ago

The documents said the zrangebylex has been added into Redis since 2.8. But when I type into the command "zrangebylex hackers [B [P", it caused an error. Is this command removed in the latest version? Thank you for your reading.

I'm using Ubuntu 14.04, the Redis version is 3.0.6. I ran "apt-get install redis-server" to install the redis.

ramwin1 commented 8 years ago

I met the same problem when I use the BITPOS command

itamarhaber commented 8 years ago

v3.0.6 supports both ZRANGEBYLEX (v2.8.9) and BITPOS (v2.8.7).

When I do apt-get install redis-server on Ubuntu 14.04 I get Redis v2.8.4 (verifiable via redis-cli INFO server) - are you sure that you're running 3.0.6?

I met the same problem when I use the BITPOS command

— Reply to this email directly or view it on GitHub https://github.com/antirez/redis-doc/issues/659#issuecomment-170545773.

ramwin1 commented 8 years ago

I'm little confused.

The infomation of redis show that the version of redis is 3.0.6, when I type in the zrange and press tab key, it auto complete the zrangebylex. But when I use dpkg command to see the version of redis, it shows the version is 2.8.4 I try to use the installation guide to install the redis, but I still get this problem.

ramwin1 commented 8 years ago

It seems that there is two redis-server on my computer. One is installed by ubuntu and another is in the ~/Downloads/redis-3.0.6/src/redis-server. After I removed the redis-server of ubuntu, and run the server by ~/Downloads/redis-3.0.6/src/redis-server, then I can use the command zrangebylex. Again, thank you for your reading and response.

itamarhaber commented 8 years ago

I'm happy you solved your issue, just note that the version reported by redis-cli isn't that of the server's, but of the CLI itself. On Jan 12, 2016 4:21 AM, "XIang Wang" notifications@github.com wrote:

It seems that there is two redis-server on my computer. One is installed by ubuntu and another is in the ~/Downloads/redis-3.0.6/src/redis-server. After I removed the redis-server of ubuntu, and run the server by ~/Downloads/redis-3.0.6/src/redis-server, then I can use the command zrangebylex. Again, thank you for your reading and response.

— Reply to this email directly or view it on GitHub https://github.com/antirez/redis-doc/issues/659#issuecomment-170761113.