Skip to content

v0.34.0

Latest

Choose a tag to compare

@applied-ai-release-bot applied-ai-release-bot released this 04 Dec 10:06

RedisVL 0.34.0 brings vector search to Flex databases, makes query filters match exactly the values you give them, deprecates the implicit default vectorizer in the AI extensions, and makes async indexes and the MCP server safe to reuse across event loops. Several fixes change behaviour, so check four things before upgrading: code that reads the result of fetch() on a HASH index, extensions constructed without a vectorizer, distance thresholds read from config as strings, and filters built from possibly empty lists.

Highlights

Vector search on Flex databases

You can now use RedisVL for vector search on Flex databases. Creating a disk HNSW index in a Flex database requires an explicit RERANK setting, which RedisVL previously had no way to express, so it could not create a vector index there. Set rerank: true or rerank: false in an HNSW field's attrs to emit RERANK TRUE or RERANK FALSE in FT.CREATE:

fields:
  - name: embedding
    type: vector
    attrs:
      algorithm: hnsw
      dims: 768
      distance_metric: cosine
      datatype: float32
      rerank: true

Schemas that leave rerank out generate the same command as before. SearchIndex.from_existing() now preserves rerank and a non-default ef_runtime when Redis reports them, so an index rebuilt from a loaded schema keeps its settings. See Index and search data in Flex databases in the Redis documentation. (#861, @vishal-bala)

SemanticCache is not yet supported on Flex databases, because it first needs HNSW support of its own. That support will come in a later release.

Filters match the values you give them

Four fixes close gaps between the value passed to a filter and what Redis was asked to match.

  • Text phrases. Text == and != now keep the value inside its quoted phrase, so values containing backslashes, punctuation or control characters match the stored text as it was indexed. Values such as user@x.com no longer raise syntax errors under DIALECT 1. The rendered filter string changes for such values, and a value with no searchable term, or containing a NUL, now raises ValueError. (#868, @vishal-bala)
  • Empty Tag values. An empty Tag value no longer means "no constraint". Tag(f) == [] matches no documents, even combined with other filters, and Tag(f) == "" matches the empty tag. Text(f) == "" raises ValueError. Pass None when you mean "no constraint". (#846, @vishal-bala)
  • Backticks and whitespace in Tag values. Tag filters now escape backticks, tabs, newlines, carriage returns, vertical tabs and form feeds. Before, == could match a different value (a`b matched a b), != excluded that value instead, and a % pattern containing one raised a syntax error. (#837, @Harshil26202)
  • Stopwords and text weights. TextQuery, HybridQuery and AggregateHybridQuery now match stopwords against the word as typed, punctuation included, so hyphenated and apostrophe stopwords in other bundled languages, such as Catalan d'un, take effect. Text made only of contractions and stopwords, such as TextQuery("it's", "body"), now raises ValueError, and escaped workarounds such as stopwords={"it\\'s"} or text_weights={"don\\'t": 2.0} silently stop matching. (#833, @chrikrah)

Deprecation: the implicit default vectorizer

Constructing SemanticCache, SemanticMessageHistory or SemanticRouter without a vectorizer now emits a DeprecationWarning, and a future release will require the argument. The fallback models are unchanged for now. To keep matching data you have already stored, pass the model named in the warning, for example vectorizer=HFTextVectorizer(model="redis/langcache-embed-v1") for SemanticCache. (#839, @vishal-bala)

Behaviour change: fetch() returns None for a missing HASH key

SearchIndex.fetch() and AsyncSearchIndex.fetch() on HASH indexes now return None for an id with no document, as JSON indexes and the documentation already did, instead of an empty dict. Add a None check before calling methods on the result or testing membership in it. The migration validator's fetch_ids check now fails correctly for a missing HASH document. (#844, @vishal-bala)

Behaviour change: one validation rule for every distance threshold

Distance thresholds on SemanticCache, SemanticMessageHistory, LangCacheSemanticCache, SemanticRouter routes, VectorRangeQuery and MultiVectorQuery now raise for a boolean, a string or NaN (and, outside routes, a Decimal). Cache, history and LangCache thresholds also raise outside 0 to 2 (0 to 1 on LangCache's "normalized" scale), so convert a threshold read from config with float().

Route thresholds set after construction, directly or through update_route_thresholds(), now raise outside (0, 2] as the constructor already did. Route validates every field on assignment, so assigning an empty references list or name raises too. A cache, history or router pointed with create_index=False at an index that does not use COSINE distance can no longer use a threshold above 2. (#838, @vishal-bala)

Async indexes and the MCP server survive a new event loop

An AsyncSearchIndex that manages its own connection can now reconnect after disconnect() on a new event loop, such as a later asyncio.run() or a fresh pytest-asyncio loop, and a stopped MCP server can run again on a new loop. Previously both could raise RuntimeError: ... is bound to a different event loop when concurrent calls raced to connect, or when a restarted server shut down while requests were still running. (#841, @vishal-bala)

Connections and protocols

  • FT.AGGREGATE queries, cursor pagination, hybrid queries, SemanticRouter matching, update_by_filter and drop_by_filter no longer raise AttributeError on a client configured with protocol=3. (#836, @servis, @Bhavy-Ranka)
  • RedisConnectionFactory.get_redis_connection, and SearchIndex with a redis_url, now accept cluster=False or ?cluster=false for a standalone server, as the async factory already did. Before, the first command raised TypeError. (#867, @hyeonsang010716)

Vectorizers and rerankers

  • BedrockVectorizer accepts explicit temporary credentials and can resolve credentials through boto3's default chain, including shared profiles, SSO and IAM roles. If you catch ValueError for missing or unavailable credentials, catch the specific botocore exception instead, such as NoCredentialsError or CredentialRetrievalError. (#865, @pcbeingused33)
  • VoyageAIReranker now ranks dict documents by the fields given in rank_by instead of the whole stringified document. A document missing one of those fields raises ValueError. (#864, @pcbeingused33)
  • HFCrossEncoderReranker.rank and arank now raise ValueError when any dict document lacks a content key, instead of silently dropping it. (#873, @pcbeingused33)

MCP server

  • Write tools now say in their error message when a failed write may have stored some records. A lost connection or timeout during an index load maps to a retryable backend_unavailable, and a schema validation failure to invalid_request. (#843, @vishal-bala)
  • Custom tool profiles can lock an exists filter on a vector field declared with index_missing. (#845, @Purv-Kabaria)

Documentation and CI

  • Broken documentation links in the README are fixed. (#872, @sarankumar1325)
  • Notebook Validation has its own HuggingFace model cache, and CI shares small pruned uv caches and cancels superseded PR runs. (#840, #859, @vishal-bala)

Contributors

Thanks to @pcbeingused33, @Harshil26202, @chrikrah, @hyeonsang010716, @Purv-Kabaria, @servis, @Bhavy-Ranka, @sarankumar1325 and @vishal-bala for their contributions to this release, including first contributions from @Harshil26202, @chrikrah, @Purv-Kabaria and @sarankumar1325.

Full changelog: v0.33.0...v0.34.0