You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: support multiple prefixes in SearchIndex.from_existing() (#258) (#392)
Fixed bug in convert_index_info_to_schema() where only the first prefix
was captured from Redis indices with multiple prefixes. Updated code to
handle Union[str, List[str]] prefix type by normalizing to first prefix
when constructing Redis keys. This maintains backward compatibility
while supporting multiple prefixes in schema definition.
- Added normalization in prefix property (index.py)
- Normalized prefix in _create_key method (storage.py)
- Updated key() method to use normalized prefix property
Maintains backward compatibility by converting single-element prefix
lists to strings when loading from Redis. This ensures schema
comparisons work correctly when comparing existing indices with new
configurations.
- Updated convert_index_info_to_schema to normalize single prefixes
- Updated unit tests to reflect normalization behavior
- Fixes schema comparison issues in semantic router and cache extensions
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
0 commit comments