Open shashirangam opened 1 week ago
Reminder...
As Michelle said in your other Issue, we think you may have better luck getting help with your question on our discord server. Here are the instructions to join and ask your question/get help to solve your issue: https://redis.io/learn/community/discord.
Combined query not working on JSON Array objects.
JSON format:
I created index in different ways as below.
FT.CREATE jindex ON JSON PREFIX 1 jsn: SCHEMA $.description as description TAG $.items.[*].name as name TAG $.items.[*].price as price NUMERIC $.items.[*].status as status NUMERIC
FT.CREATE tindex ON JSON PREFIX 1 jsn: SCHEMA $.description as description TAG $.items.*.name as name TAG $.items.*.price as price NUMERIC $.items.*.status as status NUMERIC
FT.CREATE mindex ON JSON PREFIX 1 jsn: SCHEMA $.description as description TAG $.items.[0:].name as name TAG $.items.[0:].price as price NUMERIC $.items.[0:].status as status NUMERIC
FT.CREATE gindex ON JSON PREFIX 1 jsn: SCHEMA $.description as description TAG $.items[*].name as name TAG $.items[*].price as price NUMERIC $.items[*].status as status NUMERIC
Insert data:
JSON.SET jsn:1 $ '{"description":"list of items","items":[{"status":2,"enabled":true,"name":"Item1","price":500},{"status":0,"enabled":true,"name":"Item2","price":1000},{"status":0,"enabled":true,"name":"Item2","price":1200}]}'
It is breaking our implementation where ever redis-search, business logic depends on json array. Thank you in advance for your quick response.
I am using the redis-stack latest version using docker
docker run -d --name redis-stack -p 6379:6379 -p 8001:8001 -v "D:/storage:/data:rw" redis/redis-stack:latest