1

i have saved one json using Rejson against a key,now i would like to filter/query out data using ReJson.

Please let me know how can i do it ...python prefered .

print("Abount to execute coomnad")
    response=redisClient.execute_command('JSON.SET', 'object', '.', json.dumps(data))
    print(response)
    reply = json.loads(redisClient.execute_command('JSON.GET', 'object'))
    print(reply)

using the above code i was able to set data using ReJson .now lets suppose i want to filer data .

my test json is :

data = {
    'foo': 'bar',
    'ans': 42
}

How can you filter say json in which foo has value as bar

Guy Korland
  • 9,139
  • 14
  • 59
  • 106
divyanayan awasthi
  • 890
  • 1
  • 8
  • 33

1 Answers1

2

Redis in general, and ReJSON specifically, do not provide search-by-value functionality. For that, you'll have to either index the values yourself (see https://redis.io/topics/indexes) or use RediSearch.

Itamar Haber
  • 47,336
  • 7
  • 91
  • 117