Memory DB for Redis Create Index issue

0

i am trying to create index for my DB but i getting an error as "SYNTAXERR JSON path must start with '$'. Invalid path: SORTABLE" as per Redis Stack this commend should work but not able to create any sortable field index.

this is the command FT.CREATE position-idx ON Json PREFIX 1 RedisPostions SCHEMA $.RedisKey AS RedisKey TAG SEPARATOR | $.PositionId AS PositionId NUMERIC $.BranchCode AS BranchCode TAG SEPARATOR | $.ClientAccountCode AS ClientAccountCode TAG SEPARATOR | $.PositionType AS PositionType TAG SEPARATOR | $.UserId AS UserId TAG SEPARATOR | $.ClientUserId AS ClientUserId TAG SEPARATOR | $.PositionQuantity AS PositionQuantity NUMERIC **SORTABLE **| $.QuantityElected AS QuantityElected NUMERIC $.QuantityUnElected AS QuantityUnElected NUMERIC $.QuantityOverElected AS QuantityOverElected NUMERIC $.PositionTimestamp AS PositionTimestamp NUMERIC $.AccountShortName AS AccountShortName TAG SEPARATOR |

已提问 5 个月前203 查看次数
1 回答
0

Hello, Thanks for reaching out AWS repost !

Looking at the API specs for FT.CREATE in MemoryDB Vector Search preview, it looks like it currently doesn't support the SORTABLE property in the SCHEMA.

[+] Vector search commands - https://docs.aws.amazon.com/memorydb/latest/devguide/vector-search-commands-ft.create.html

After dropping "SORTABLE", the following command should work,

FT.CREATE position-idx ON Json PREFIX 1 RedisPostions SCHEMA $.RedisKey AS RedisKey TAG SEPARATOR | $.PositionId AS PositionId NUMERIC $.BranchCode AS BranchCode TAG SEPARATOR | $.ClientAccountCode AS ClientAccountCode TAG SEPARATOR | $.PositionType AS PositionType TAG SEPARATOR | $.UserId AS UserId TAG SEPARATOR | $.ClientUserId AS ClientUserId TAG SEPARATOR | $.PositionQuantity AS PositionQuantity NUMERIC $.QuantityElected AS QuantityElected NUMERIC $.QuantityUnElected AS QuantityUnElected NUMERIC $.QuantityOverElected AS QuantityOverElected NUMERIC $.PositionTimestamp AS PositionTimestamp NUMERIC $.AccountShortName AS AccountShortName TAG SEPARATOR |

I trust this information helps. If you still face issues post this, please feel free to open a support case with us.

Akhil_P
已回答 5 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则