Skip to content

httpapi: vector-store: expose index creation options via API endpoints - #545

Merged
ewienik merged 8 commits into
scylladb:masterfrom
QuerthDP:add-index-options-to-status
Aug 6, 2026
Merged

httpapi: vector-store: expose index creation options via API endpoints#545
ewienik merged 8 commits into
scylladb:masterfrom
QuerthDP:add-index-options-to-status

Conversation

@QuerthDP

@QuerthDP QuerthDP commented Aug 5, 2026

Copy link
Copy Markdown
Member

Today the only way to see the options an index was created with is to
query ScyllaDB directly via CQL (system_schema.indexes). This PR
surfaces those options through the HTTP API, using only what Vector Store
already holds in memory - no extra ScyllaDB queries.

  • GET /indexes now includes each index's creation options, alongside its existing keyspace/name/type fields.
  • GET /indexes/{keyspace}/{index}/status is unchanged - it stays
    focused on operational status (state, count, build progress).
  • GET /indexes/{keyspace}/{index} is new - the same
    type and options information as the /indexes listing, scoped to one
    index, so a caller who already knows which index they care about
    doesn't have to fetch and filter the whole list.

Fixes: VECTOR-723

@QuerthDP
QuerthDP force-pushed the add-index-options-to-status branch 6 times, most recently from 0ea44d0 to 179a764 Compare August 5, 2026 14:41
@QuerthDP
QuerthDP marked this pull request as ready for review August 5, 2026 14:42
@QuerthDP
QuerthDP requested review from Akvear and ewienik and a balanced review from Copilot and removed request for Copilot August 5, 2026 14:42

Copilot AI 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.

Pull request overview

Exposes in-memory index creation options through index listing and lookup APIs.

Changes:

  • Adds GET /indexes/{keyspace}/{index}/info.
  • Extends index metadata responses with vector/full-text options.
  • Adds integration tests and shared test utilities.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
api/openapi.json Updates generated API specification.
crates/httpapi/src/lib.rs Defines index option response models.
crates/httpclient/src/lib.rs Adds the index-info client method.
crates/vector-store/src/engine.rs Simplifies index metadata access.
crates/vector-store/src/httproutes.rs Implements listing and info responses.
crates/vector-store/src/indexes.rs Retains full-text index options.
crates/vector-store/src/lib.rs Adds full-text option accessors.
tests/integration/common.rs Centralizes index test helpers.
tests/integration/index_info.rs Tests option responses.
tests/integration/index_status.rs Uses shared helpers.
tests/integration/main.rs Registers new test modules.
tests/integration/opensearch.rs Updates vector test configuration.
tests/integration/quantization.rs Validates quantization in options.
tests/integration/routing.rs Moves helpers to the common module.
tests/integration/vs_index.rs Updates vector index test configuration.

Comment thread crates/httpapi/src/lib.rs Outdated
Comment thread crates/vector-store/src/httproutes.rs
Comment thread crates/vector-store/src/engine.rs
Comment thread crates/vector-store/src/httproutes.rs Outdated
Comment thread crates/httpapi/src/lib.rs Outdated
Comment thread crates/httpapi/src/lib.rs Outdated
Comment thread crates/vector-store/tests/integration/common.rs Outdated
Comment thread crates/httpapi/src/lib.rs
Comment thread crates/vector-store/src/httproutes.rs Outdated
The keyspace/index parameter descriptions on
`GET /api/v1/indexes/{keyspace}/{index}/status` still said
"vector index", even though the handler has served both
vector and fulltext indexes for a while.

The 200 response example was also missing the `build_progress`
field that the response actually returns.
`GET /indexes` already read fulltext indexes straight from the shared
`Arc<RwLock<Indexes>>`, but for vector indexes it round-tripped through
the Engine actor via `Engine::GetVsIndexKeys` to fetch the same data
the lock already holds.

Refactor to read both kinds directly instead, and drop
the `Engine::GetVsIndexKeys` message and its plumbing.
Today the only way to see the options an index was created with is to
query ScyllaDB directly via CQL (`system_schema.indexes`).
Surface the options Vector Store already holds in memory through
`GET /indexes` instead, so operators and clients can inspect them without
a separate CQL round-trip.

Report the type as a `type` tag on `IndexOptions` itself rather than as
a separate, flattened `IndexType`, so each index's type and options live
together under a single `options` object instead of being split across
the response.

Fulltext indexes now store an `IndexOptionsFts` on their entry
(currently empty; the tantivy backend hardcodes analyzer and token positions)
so `get_indexes` can read options for both kinds.

Bump the API version to 3.0.0. Restructuring the response is a breaking
change for existing clients.

Adjust tests to match the new `IndexInfo` fields comparison.
`setup`, `add_table`, `make_index`, and the scan/uuid helpers were
defined in `routing.rs` even though `index_status.rs` already needed
them too and had to reach for them.

Move them into a new common module, shared by all integration test
modules, with no behavior change.
The integration tests only had a way to build a default-options vector
index (`make_index`). Rename it to `make_vs_index` and factor it through
a shared `make_index_with_kind` that takes the `IndexKind` directly,
so tests can construct an index with explicit options without duplicating
the `IndexMetadata` boilerplate.
Add a test covering the options field added to `GET /indexes`.
Create two vector indexes with distinct options and one fulltext index,
then check each listed entry's options match what it was created with.

Add `make_fts_index`, the fulltext-index builder the test needs.
The `/indexes` listing added in a previous commit reports each index's
type and creation options, but there was no way to look up that same
information for a single, known index without listing everything
and filtering client-side.

Add `GET /indexes/{keyspace}/{index}`, returning the same `IndexInfo`
shape scoped to one index (404 if it doesn't exist).
Cover `GET /indexes/{keyspace}/{index}` added in a previous commit.

One test for a vector index with non-default options,
one for a fulltext index, each checking the endpoint reports the exact
options (including type) the index was created with.

Add the `HttpClient::index_info` helper the tests need.
@QuerthDP
QuerthDP force-pushed the add-index-options-to-status branch from 179a764 to 5a3f7a6 Compare August 6, 2026 13:29
@QuerthDP

QuerthDP commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

Changelog:

  • bump API version to 3.0.0
  • bump license version in common.rs to 1.1
  • include index type in options
  • rename the GET /indexes/{keyspace}/{index}/info endpoint to GET /indexes/{keyspace}/{index}

@QuerthDP
QuerthDP requested a review from ewienik August 6, 2026 13:32
@ewienik
ewienik added this pull request to the merge queue Aug 6, 2026
Merged via the queue into scylladb:master with commit e2e97f0 Aug 6, 2026
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants