Skip to content

Expose a direct “build/rebuild vector index now” API (no search trigger) #3141

@tae898

Description

@tae898

Summary
Today the vector graph builds only via:

  • Implicit search (ensureGraphAvailable()buildGraphFromScratch()), or
  • SQL: REBUILD INDEX <name>.

There’s no public Java API to trigger a graph build/rebuild without a dummy search or SQL.

Ask
Add a public method on LSMVectorIndex (e.g., rebuildNow() / rebuildNow(GraphBuildCallback cb)) that rebuilds from persisted pages and persists the graph. This lets apps force the expensive build right after ingest and before serving.

Scope/Notes

  • Keep it vector-index–specific (no Index interface change).
  • Internally acquire the write lock and reuse existing buildGraphFromScratch() retry logic.
  • Document preconditions (not during compaction; rebuilds from on-disk pages; persists graph).
  • Accessible via schema lookup (db.getSchema().getIndexByName(...) → cast to LSMVectorIndex).

Help
I’m happy to draft the PR for this if desired.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions