Search code examples
redisredis-cli

Redis bitcount command returns a syntax error


after set myKey as key in Redis with foobar value I want to get the BITCOUNT of myKey. this command in Redis-CLI giving me an error: BITCOUNT myKey 2 3 BYTE

(error) ERR syntax error

how can I solve this?


Solution

  • BYTE argument is fairly new and (will be) added in Redis 7.0. So far, only 7.0.0rc3 is released but no GA.

    I assume you are using a pre Redis 7 version?