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

[RESP] SORT can't sort by hash

XMLWordPrintable

      Infinsipan seems to be missing capability to SORT by hashes. See Using hashes in BY and GET at https://redis.io/docs/latest/commands/sort/ for more information.

      Infinispan:

      127.0.0.1:11222> lpush tosort 1
      (integer) 1
      127.0.0.1:11222> set weight_1 15
      OK
      127.0.0.1:11222> hset wobj_1 weight 15
      (integer) 1
      127.0.0.1:11222> lpush tosort 2
      (integer) 2
      127.0.0.1:11222> set weight_2 33
      OK
      127.0.0.1:11222> hset wobj_2 weight 33
      (integer) 1
      127.0.0.1:11222> lpush tosort 3
      (integer) 3
      127.0.0.1:11222> set weight_3 7
      OK
      127.0.0.1:11222> hset wobj_3 weight 7
      (integer) 1
      127.0.0.1:11222> sort tosort BY wobj_*->weight
      1) "1"
      2) "2"
      3) "3"
      

      Redis:

      127.0.0.1:6379> lpush tosort 1
      (integer) 1
      127.0.0.1:6379> set weight_1 15
      OK
      127.0.0.1:6379> hset wobj_1 weight 15
      (integer) 1
      127.0.0.1:6379> lpush tosort 2
      (integer) 2
      127.0.0.1:6379> set weight_2 33
      OK
      127.0.0.1:6379> hset wobj_2 weight 33
      (integer) 1
      127.0.0.1:6379> lpush tosort 3
      (integer) 3
      127.0.0.1:6379> set weight_3 7
      OK
      127.0.0.1:6379> hset wobj_3 weight 7
      (integer) 1
      127.0.0.1:6379> sort tosort BY wobj_*->weight
      1) "3"
      2) "1"
      3) "2"
      

            rh-ee-jbolina Jose Bolina
            rhn-support-pdrobek Pavel Drobek
            Pavel Drobek Pavel Drobek
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: