From 864957f39d1139c9faa524db281f75722211a0e1 Mon Sep 17 00:00:00 2001 From: armorbreak001 Date: Thu, 23 Apr 2026 01:34:29 +0800 Subject: [PATCH] fix(redis): wrap prefix string in list for IndexDefinition redis-py's IndexDefinition treats the prefix argument as an iterable. Passing a plain string causes each character to become a separate prefix (e.g., 'foo:' becomes ['f','o','o',':']). Wrap in a list to send a single prefix. --- python/semantic_kernel/connectors/redis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/semantic_kernel/connectors/redis.py b/python/semantic_kernel/connectors/redis.py index 575624895aca..902337d1dacd 100644 --- a/python/semantic_kernel/connectors/redis.py +++ b/python/semantic_kernel/connectors/redis.py @@ -278,7 +278,7 @@ async def ensure_collection_exists(self, **kwargs) -> None: raise VectorStoreOperationException("Invalid index type supplied.") fields = _definition_to_redis_fields(self.definition, self.collection_type) index_definition = IndexDefinition( - prefix=f"{self.collection_name}:", index_type=INDEX_TYPE_MAP[self.collection_type] + prefix=[f"{self.collection_name}:"], index_type=INDEX_TYPE_MAP[self.collection_type] ) await self.redis_database.ft(self.collection_name).create_index(fields, definition=index_definition, **kwargs)