Skip to content

Add pathseer filter strategy for HNSW vector index - #2157

Merged
rlmanrique merged 1 commit into
mainfrom
feat/pathseer-filter-strategy
Sep 8, 2026
Merged

Add pathseer filter strategy for HNSW vector index#2157
rlmanrique merged 1 commit into
mainfrom
feat/pathseer-filter-strategy

Conversation

@rlmanrique

Copy link
Copy Markdown
Contributor

Motivation

Weaviate core is adding pathseer (weaviate/weaviate#12137, targeting 1.40), a third HNSW filter strategy that adaptively decides per query between sweeping and multi-hop candidate discovery. The client needs to expose it so users can configure it — but more importantly, without the enum value the client cannot even read the config of a collection that uses it: collection.config.get() deserializes the server response via VectorFilterStrategy(config["filterStrategy"]) and raises a ValueError on the unknown string. This makes the change a forward-compatibility fix as well as a feature enablement.

Approach

Add PATHSEER = "pathseer" to the existing VectorFilterStrategy enum in config_vector_index.py. No serialization or validation changes are needed — the strategy is passed through as a string and validated server-side, which keeps the client agnostic to strategy semantics (same pattern as ACORN).

Risks and mitigations

  • Older servers rejecting the value: the client doesn't gate on server version by design; a pre-1.40 server returns a clear validation error. Consistent with how other newer config options are handled.
  • Otherwise trivial: additive enum value, no behavior change for existing strategies.

Testing

  • Unit: Configure.VectorIndex.hnsw(filter_strategy=PATHSEER) serializes to "filterStrategy": "pathseer".
  • Integration (skipped below server 1.40.0): creates a collection with pathseer, reads it back via config.get() (exercising the deserialization path that previously would have raised), then round-trips Reconfigure updates pathseer → acorn → pathseer to verify the strategy is mutable in both directions. Verified passing against a local 1.40.0-dev server built from the core branch.

Weaviate core is adding an adaptive filtered-HNSW search strategy
named 'pathseer' (weaviate/weaviate#12137) as a third filterStrategy
value alongside 'sweeping' and 'acorn'. Expose it in the client via a
new VectorFilterStrategy.PATHSEER enum member.

Includes a unit test for serialization and an integration test (gated
on server >= 1.40.0) covering creation and runtime updates in both
directions.

@orca-security-eu orca-security-eu Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

@rlmanrique
rlmanrique merged commit d9b2aaa into main Sep 8, 2026
121 of 127 checks passed
@rlmanrique
rlmanrique deleted the feat/pathseer-filter-strategy branch September 8, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants