RedisJSON / redisjson-py

An extension to redis-py for using Redis' ReJSON module
https://redisjson.io
BSD 2-Clause "Simplified" License
160 stars 34 forks source link

Get/Filter in a JSON Key Values #38

Open wscardua opened 4 years ago

wscardua commented 4 years ago

Hi Guys,

look my json

JSON.GET 906461499 "{"name": "jony", "time": "10:36:49", "date": "20190109", "ope": "U", "table": "C20010", "field": "U"}"

How can I get/filter in a JSON key value, like "name = 'jony'"

Thank you

gkorland commented 4 years ago

You should use the master version of RedisJSON https://github.com/RedisJSON/RedisJSON

JSON.QGET person "@name:jony"
wscardua commented 4 years ago

Hi gkorland,

Thank you ..,

but I receive a error when I try to create a index

JSON.INDEX ADD name_idx name $.name (error) unknown command JSON.INDEX, with args beginning with: ADD, name_idx, name, $.name,

module list 1) 1) "name" 2) "ft" 3) "ver" 4) (integer) 10613 2) 1) "name" 2) "ReJSON" 3) "ver" 4) (integer) 10004

gkorland commented 4 years ago

@wscardua which version are you using? Notice JSON.INDEX is only available on master. You can also get it from dockerhub docker pull redislabs/rejson:edge