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 |

asked 5 months ago183 views
1 Answer
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
answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions