Skip to content

feat: create vector indices without training#7211

Open
burlacio wants to merge 1 commit into
lance-format:mainfrom
burlacio:create-index-wout-training
Open

feat: create vector indices without training#7211
burlacio wants to merge 1 commit into
lance-format:mainfrom
burlacio:create-index-wout-training

Conversation

@burlacio

Copy link
Copy Markdown
Contributor

Summary

Enable create_index(..., train=False) for vector indices,
completing the empty-index story that already worked for
scalar/FTS indices.

Previously this path hit todo!("create empty vector index when train=false") and panicked.

The work touches three things:

  • rust/lance/src/index/create.rs — removes the todo!()
    and lets the existing build_empty_vector_index helper handle
    the train=false branch.
  • rust/lance/src/index.rs — empty (definition-only) indices
    have no on-disk files, so the stats and vector-detection paths
    needed adjustments:
    • collect_regular_indices_statistics now short-circuits when
      fragment_bitmap is empty and returns {} instead of trying to
      open a non-existent index file.
    • is_vector_index detection prefers index_details metadata
      over file-based probing, since empty indices have no
      INDEX_FILE_NAME to inspect. The file-based path is kept as a
      fallback for older indices.

@github-actions github-actions Bot added A-python Python bindings enhancement New feature or request labels Jun 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

ACTION NEEDED
Lance follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.

For details on the error please inspect the "PR Title Check" action.

@burlacio burlacio changed the title feat: Create indices without training feat: create indices without training Jun 10, 2026
@burlacio burlacio changed the title feat: create indices without training feat: create vector indices without training Jun 10, 2026
@burlacio burlacio force-pushed the create-index-wout-training branch from d8d015e to 2dd9759 Compare June 10, 2026 19:09
@burlacio burlacio force-pushed the create-index-wout-training branch from b566eee to 5b28af9 Compare June 10, 2026 19:10
@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.88889% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
rust/lance/src/index.rs 88.88% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-python Python bindings enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant