Skip to content

Implement scan_factor and max_candidates for query#617

Merged
austin-denoble merged 6 commits intomainfrom
adenoble/new-drn-query-knobs
Feb 19, 2026
Merged

Implement scan_factor and max_candidates for query#617
austin-denoble merged 6 commits intomainfrom
adenoble/new-drn-query-knobs

Conversation

@austin-denoble
Copy link
Contributor

@austin-denoble austin-denoble commented Feb 18, 2026

Problem

There are new parameters available on query for indexes with dedicated read nodes:

  • scan_factor
  • max_candidates

These were pulled into the 2025-10 API release and need to be added to the clients.

Solution

  • Regenerate core from OpenAPI and protos off of 2025-10 to pull in scan_factor and max_candidates.
  • Add max_candidates and scan_factor to the following resources and thread things through the API:
    • VectorResourceAsyncio.query() && VectorResourceAsyncio.query_namespaces()
    • VectorResource.query() && VectorResource.query_namepspaces()
    • Index.query() && Index.query_namespaces()
    • _IndexAsyncio.query() && _IndexAsyncio.query_namespaces()
    • IndexRequestFactory.query_request()
    • GRPCIndex.query() && `GRPCIndex.query_namespaces()

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Infrastructure change (CI configs, etc)
  • Non-code change (docs, etc)
  • None of the above: (explain here)

Test Plan

CI - unit and integration tests


Note

Medium Risk
Touches core query request construction and propagates new parameters through both REST and gRPC layers; risk is mainly incorrect serialization/forwarding or validation edge cases, mitigated by added unit coverage.

Overview
Adds two new query tuning parameters, scan_factor and max_candidates, to the QueryRequest schema and surfaces them through all query entrypoints (Index.query, query_namespaces, sync/async vector resources, and GRPCIndex.query).

Regenerates the 2025-10 OpenAPI and protobuf bindings to include the new fields (with validations and typing) and updates the request factory to include them only when provided. Unit tests are expanded to assert correct forwarding/omission behavior for REST, asyncio, and gRPC query calls, and the generated API repo SHA is bumped.

Written by Cursor Bugbot for commit 0c40a43. This will update automatically on new commits. Configure here.

…b_data/index.py, db_data/index_asyncio.py, db_data/resources/sync/vector.py, and db_data/resources/asyncio/vector_asyncio.py. update IndexRequestFactory.query_request() to handle max_candidates and scan_factor
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@austin-denoble austin-denoble merged commit 4ed1cbc into main Feb 19, 2026
43 checks passed
@austin-denoble austin-denoble deleted the adenoble/new-drn-query-knobs branch February 19, 2026 19:18
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.

1 participant

Comments