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 |

preguntada hace 5 meses203 visualizaciones
1 Respuesta
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
respondido hace 5 meses

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas