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

Issue for Jsonpath filter support #35

Closed cw1427 closed 4 years ago

cw1427 commented 4 years ago

It looks like doesn't support jsonpath filter feature? Like for example: "[?(@.name=='Admin')]"

Refer: https://support.smartbear.com/alertsite/docs/monitors/api/endpoint/jsonpath.html

gkorland commented 4 years ago

You should check RedisJSON2.

https://github.com/RedisJSON/redisjson2

cw1427 commented 4 years ago

WOW, that is awesome. @gkorland will think about migrate to redisjson2. Is it ready the redison-py or other language client library to support redisjons2 ?

gkorland commented 4 years ago

Yes, the existing clients should work with it

cw1427 commented 4 years ago

Perfect, I will have a trial. Thanks a lot @gkorland.

cw1427 commented 4 years ago

Hi @gkorland :

I go through the redisjson-py master branch code, but didn't find any command interface regard redisjson2. Are you sure that it had already been supported?

gkorland commented 4 years ago

the client doesn't support indexes yet, but you can pass Path supports any string based path.

e.g.

rj.jsonget('obj', Path('$.truth.coord[?(@.name==\'Admin\')]'))