Skip to content

feat: add open to read-only plain vector index#9426

Draft
dancixx wants to merge 1 commit into
devfrom
feat/readonly-plain-vector-index-open
Draft

feat: add open to read-only plain vector index#9426
dancixx wants to merge 1 commit into
devfrom
feat/readonly-plain-vector-index-open

Conversation

@dancixx

@dancixx dancixx commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Read-only open for ReadOnlyPlainVectorIndex — mirror of PlainVectorIndex::new (full-scan, no on-disk files).

First of the read-only vector index open stack (→ HNSW → dispatcher).

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 1b6ea48e-b6a3-420e-8223-b68bc4119379

📥 Commits

Reviewing files that changed from the base of the PR and between 9acece1 and e8fd2da.

📒 Files selected for processing (1)
  • lib/segment/src/index/plain_vector_index/read_only/mod.rs

📝 Walkthrough

Walkthrough

This PR introduces a public open constructor method for ReadOnlyPlainVectorIndex<S>. The change adds an OperationResult import and implements a new open function that accepts shared backend handles (id_tracker, vector_storage, quantized_vectors, payload_index) and initializes operation duration telemetry aggregators for both filtered and unfiltered searches before returning a fully wired instance.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Suggested reviewers

  • generall
  • coszio

Poem

🐰 A constructor hops into view,
With telemetry fresh and new,
Backend handles neatly tied,
Vectors waiting deep inside! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and concisely describes the main change: adding an 'open' function to the read-only plain vector index, which directly matches the code modification.
Description check ✅ Passed The description is directly related to the changeset, explaining the purpose of the new 'open' function, its role as a mirror of 'PlainVectorIndex::new', and its position in a larger refactoring effort.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dancixx dancixx mentioned this pull request Jun 10, 2026
93 tasks
@dancixx dancixx force-pushed the feat/readonly-plain-vector-index-open branch from 16713b1 to e8fd2da Compare June 11, 2026 15:12
@dancixx dancixx requested a review from coszio June 11, 2026 19:49
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