diff --git a/src/index/Cargo.toml b/src/index/Cargo.toml index 03fa4da4e8..361584eee8 100644 --- a/src/index/Cargo.toml +++ b/src/index/Cargo.toml @@ -7,6 +7,9 @@ license.workspace = true [lints] workspace = true +[features] +vector_index = ["dep:usearch"] + [dependencies] async-trait.workspace = true asynchronous-codec = "0.7.0" @@ -41,7 +44,7 @@ tantivy = { version = "0.24", features = ["zstd-compression"] } tantivy-jieba = "0.16" tokio.workspace = true tokio-util.workspace = true -usearch = { version = "2.21", default-features = false, features = ["fp16lib"] } +usearch = { version = "2.21", default-features = false, features = ["fp16lib"], optional = true } uuid.workspace = true [dev-dependencies] diff --git a/src/index/src/lib.rs b/src/index/src/lib.rs index f4f299bef6..c469acb8c3 100644 --- a/src/index/src/lib.rs +++ b/src/index/src/lib.rs @@ -22,6 +22,7 @@ pub mod external_provider; pub mod fulltext_index; pub mod inverted_index; pub mod target; +#[cfg(feature = "vector_index")] pub mod vector; pub type Bytes = Vec;