Skip to content

MemoryDB Valkey Vector commands and set up

0

I want to use memory DB as a vector DB. in my code i have commands such as FT.CREATE and i am using engine valkey 7.3. I have one memorydb cluster with a single shard. Unless im misunderstanding, according to the documentation should, my cluster should support this command. Howver upon execution of thiese commands im getting the error "Command not enabled, Vector Search is not supported on this cluster configuration" Any ideas why. Im using python cdk to create my memorydb CFNCluster instance and have no problem connecting to said cluster.

2 Answers
0

Hello.

Is the vector search option enabled on your MemoryDB cluster as described in the following documentation?
https://docs.aws.amazon.com/memorydb/latest/devguide/vector-search-cluster.html

EXPERT

answered a year ago

  • Ah you're correct it was set to disabled in the AWS console. Not sure exactly how to set this value from the cdk though. Can this be done? It looks like its this parameter group setting. Thanks

  • It doesn't seem to be a CDK parameter. It looks like it would be fine to use "default.memorydb-valkey7.search" in the cluster parameter group. The parameter "search-enabled" must be set to "yes". Therefore, using "default.memorydb-valkey7.search" should enable vector search.

0

To use vector search commands like FT.CREATE in Amazon MemoryDB with Valkey, you need to explicitly enable the vector search capability when creating your cluster. Based on your error message "Command not enabled, Vector Search is not supported on this cluster configuration," it appears that your cluster was created without enabling vector search.

When creating a MemoryDB cluster with vector search capability, you need to:

  1. Enable the Vector Search capability specifically during cluster creation
  2. Use the appropriate parameter group - when vector search is enabled, you must use default.memorydb-valkey7.search parameter group
  3. The number of shards will be fixed when vector search is enabled

In your Python CDK code for the CFNCluster, you need to ensure you're setting the appropriate parameters to enable vector search. The cluster creation should include the vector search parameter explicitly.

Once you have a properly configured cluster with vector search enabled, you'll be able to use commands like FT.CREATE, FT.SEARCH, FT.AGGREGATE, and other vector search commands.

Note that after creating a vector index using FT.CREATE, there's a backfilling process that runs in the background to scan the keyspace and add keys to the index. During this backfilling process, query operations will return an error, so you'll need to wait until the backfill is complete (which you can check using the FT.INFO command).
Sources
Vector search commands - Amazon MemoryDB
Vector search for Amazon MemoryDB is now generally available | AWS News Blog
Vector search overview - Amazon MemoryDB
Getting started with MemoryDB - Amazon MemoryDB

answered a year ago

EXPERT

reviewed a year 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.