Skip to content

vector-store: add Tantivy dependency and runtime FTS configuration#439

Draft
knowack1 wants to merge 1 commit into
scylladb:masterfrom
knowack1:vector-620-add-tantivy
Draft

vector-store: add Tantivy dependency and runtime FTS configuration#439
knowack1 wants to merge 1 commit into
scylladb:masterfrom
knowack1:vector-620-add-tantivy

Conversation

@knowack1
Copy link
Copy Markdown
Collaborator

@knowack1 knowack1 commented May 6, 2026

Add Tantivy 0.22 as a workspace dependency for full-text search support.
Introduce VECTOR_STORE_FTS_ENABLED env var (true/false, default: false) to
control FTS at runtime, parsed in config_manager alongside existing env vars.
Add fts_enabled field to Config and a placeholder fts module.

Fixes: VECTOR-620

@ewienik
Copy link
Copy Markdown
Collaborator

ewienik commented May 6, 2026

Add tantivy 0.22 as an optional dependency gated behind the 'fts' cargo feature flag. When compiled without --features fts (the default), the dependency is excluded from the build.

As I recall we were talking about dynamic flag, not static one. Maybe better would be to add configuration env?

@knowack1
Copy link
Copy Markdown
Collaborator Author

knowack1 commented May 6, 2026

Add tantivy 0.22 as an optional dependency gated behind the 'fts' cargo feature flag. When compiled without --features fts (the default), the dependency is excluded from the build.

As I recall we were talking about dynamic flag, not static one. Maybe better would be to add configuration env?

Unfortunately we did not make notes in jira ticket afterward :) We can switch to dynamic config.

@knowack1 knowack1 force-pushed the vector-620-add-tantivy branch 2 times, most recently from 0b5e910 to 3d5a009 Compare May 8, 2026 08:07
QuerthDP
QuerthDP previously approved these changes May 8, 2026
Copy link
Copy Markdown
Member

@QuerthDP QuerthDP left a comment

Choose a reason for hiding this comment

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

Looks good.
Although I think the cargo machete will fail since we're not using the tantivy anywhere.

Comment thread crates/vector-store/src/fts.rs Outdated
@@ -0,0 +1,4 @@
/*
* Copyright 2025-present ScyllaDB
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

vector-store: add Tantivy dependency and fts feature flag
Add tantivy 0.22 as an optional dependency gated behind the 'fts'
cargo feature flag. When compiled without --features fts (the default),
the dependency is excluded from the build.

Update the commit message

@knowack1 knowack1 force-pushed the vector-620-add-tantivy branch 2 times, most recently from 3d5a009 to 3068b6d Compare May 8, 2026 10:05
Add Tantivy 0.22 as a workspace dependency for full-text search support.
Introduce VECTOR_STORE_FTS_ENABLED env var (bool, default: false) to
control FTS at runtime, parsed in config_manager alongside existing
env vars. Add fts_enabled field to Config and a placeholder fts module.

Fixes VECTOR-620
@knowack1 knowack1 force-pushed the vector-620-add-tantivy branch from 3068b6d to 3dfb661 Compare May 8, 2026 10:08
@knowack1 knowack1 changed the title vector-store: add Tantivy dependency and fts feature flag vector-store: add Tantivy dependency and runtime FTS configuration May 8, 2026
@knowack1
Copy link
Copy Markdown
Collaborator Author

knowack1 commented May 8, 2026

Add tantivy 0.22 as an optional dependency gated behind the 'fts' cargo feature flag. When compiled without --features fts (the default), the dependency is excluded from the build.

As I recall we were talking about dynamic flag, not static one. Maybe better would be to add configuration env?

Unfortunately we did not make notes in jira ticket afterward :) We can switch to dynamic config.

Done

@knowack1
Copy link
Copy Markdown
Collaborator Author

knowack1 commented May 8, 2026

Looks good. Although I think the cargo machete will fail since we're not using the tantivy anywhere.

Done. Added use in fts.rs.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR lays groundwork for future full-text search (FTS) support by adding Tantivy to the workspace and introducing a runtime configuration flag (VECTOR_STORE_FTS_ENABLED, default false) that is parsed into the Vector Store Config.

Changes:

  • Add Tantivy (0.22) as a workspace dependency and enable it for the vector-store crate.
  • Extend Config with fts_enabled: bool and parse VECTOR_STORE_FTS_ENABLED in load_config.
  • Add a placeholder fts module to ensure the Tantivy dependency is wired into the crate.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
crates/vector-store/src/lib.rs Adds fts module and introduces Config::fts_enabled with default false.
crates/vector-store/src/fts.rs Placeholder module that references Tantivy.
crates/vector-store/src/config_manager.rs Parses VECTOR_STORE_FTS_ENABLED into Config.
crates/vector-store/Cargo.toml Adds tantivy as a crate dependency (via workspace).
Cargo.toml Adds tantivy = "0.22" to workspace dependencies.
Cargo.lock Locks Tantivy and its transitive dependencies.

Comment on lines +308 to +318
if let Some(fts_enabled) = env("VECTOR_STORE_FTS_ENABLED")
.ok()
.map(|v| {
v.trim().parse().or(Err(anyhow!(
"Unable to parse VECTOR_STORE_FTS_ENABLED env (true/false)"
)))
})
.transpose()?
{
config.fts_enabled = fts_enabled;
}
* Copyright 2026-present ScyllaDB
* SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.1
*/

Comment on lines 156 to 178
#[derive(Clone, Debug)]
pub struct Config {
pub vector_store_addr: std::net::SocketAddr,
pub scylladb_uri: String,
pub threads: Option<usize>,
pub memory_limit: Option<u64>,
pub memory_usage_check_interval: Option<Duration>,
pub opensearch_addr: Option<String>,
pub credentials: Option<Credentials>,
pub usearch_simulator: Option<Vec<Duration>>,
pub alter_index_simulator: bool,
pub cql_connection_timeout: Option<Duration>,
pub cql_keepalive_interval: Option<Duration>,
pub cql_keepalive_timeout: Option<Duration>,
pub cql_tcp_keepalive_interval: Option<Duration>,
pub cql_uri_translation_map: Option<HashMap<SocketAddr, SocketAddr>>,
pub cdc_safety_interval: Option<Duration>,
pub cdc_sleep_interval: Option<Duration>,
pub cdc_fine_safety_interval: Option<Duration>,
pub cdc_fine_sleep_interval: Option<Duration>,
pub disable_colors: bool,
pub fts_enabled: bool,
pub tls_cert_path: Option<std::path::PathBuf>,
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.

4 participants