0

I wanted to use redisearch with JSON data. But I wanted segregate JSON data in different namespace so that index created can only search on specific namespace. Currently redisearch index are created on schema but doesn't have KEY prefix

FT.CREATE IDX ON JSON SCHEMA $ ......

for non-JSON prefix option is available but that doesn't contain JSON data.

How to solve this problem ??

1 Answers1

0

I'm assuming you mean the prefix for the keyspace? Just specify the prefix or prefixes you want when you create the index:

FT.CREATE some:index ON JSON PREFIX 2 some:json: some:other:json: SCHEMA ...

And that's it.

Guy Royse
  • 2,739
  • 12
  • 9