Uploaded image for project: 'Red Hat Data Grid'
  1. Red Hat Data Grid
  2. JDG-7439

[RESP] Sorting by nonexisting key doesn't take into account ASC/DESC options

XMLWordPrintable

    • False
    • None
    • False

      The list should be inverted with DESC option

      127.0.0.1:11222> zadd zset 1 a 5 b 2 c 10 d 3 e
      (integer) 5
      127.0.0.1:11222> sort zset by nosort asc
      1) "a"
      2) "c"
      3) "e"
      4) "b"
      5) "d"
      127.0.0.1:11222> sort zset by nosort desc
      1) "a"
      2) "c"
      3) "e"
      4) "b"
      5) "d"
      

      Redis:

      127.0.0.1:6379> zadd zset 1 a 5 b 2 c 10 d 3 e
      (integer) 5
      127.0.0.1:6379> sort zset by nosort
      1) "a"
      2) "c"
      3) "e"
      4) "b"
      5) "d"
      127.0.0.1:6379> sort zset by nosort desc
      1) "d"
      2) "b"
      3) "e"
      4) "c"
      5) "a"
      

              Unassigned Unassigned
              rhn-support-pdrobek Pavel Drobek
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: