diff --git a/Cargo.toml b/Cargo.toml
index 4e8482d2..9923268e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -5,10 +5,10 @@ exclude = ["python"]
resolver = "2"
[workspace.dependencies]
-lance = { "version" = "=0.9.6", "features" = ["dynamodb"] }
-lance-index = { "version" = "=0.9.6" }
-lance-linalg = { "version" = "=0.9.6" }
-lance-testing = { "version" = "=0.9.6" }
+lance = { "version" = "=0.9.7", "features" = ["dynamodb"] }
+lance-index = { "version" = "=0.9.7" }
+lance-linalg = { "version" = "=0.9.7" }
+lance-testing = { "version" = "=0.9.7" }
# Note that this one does not include pyarrow
arrow = { version = "49.0.0", optional = false }
arrow-array = "49.0"
@@ -23,6 +23,6 @@ half = { "version" = "=2.3.1", default-features = false, features = [
"num-traits",
] }
log = "0.4"
-object_store = "0.8.0"
+object_store = "0.9.0"
snafu = "0.7.4"
url = "2"
diff --git a/python/pyproject.toml b/python/pyproject.toml
index 2a386fd9..bff33e0f 100644
--- a/python/pyproject.toml
+++ b/python/pyproject.toml
@@ -3,7 +3,7 @@ name = "lancedb"
version = "0.5.0"
dependencies = [
"deprecation",
- "pylance==0.9.6",
+ "pylance==0.9.7",
"ratelimiter~=1.0",
"retry>=0.9.2",
"tqdm>=4.27.0",
diff --git a/rust/vectordb/Cargo.toml b/rust/vectordb/Cargo.toml
index 63c73221..70e7c868 100644
--- a/rust/vectordb/Cargo.toml
+++ b/rust/vectordb/Cargo.toml
@@ -31,6 +31,8 @@ bytes = "1"
futures = "0"
num-traits = "0"
url = { workspace = true }
+serde = { version = "^1" }
+serde_json = { version = "1" }
[dev-dependencies]
tempfile = "3.5.0"
diff --git a/rust/vectordb/src/index/vector.rs b/rust/vectordb/src/index/vector.rs
index 4017d635..418b43c4 100644
--- a/rust/vectordb/src/index/vector.rs
+++ b/rust/vectordb/src/index/vector.rs
@@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+use serde::Deserialize;
+
use lance::format::{Index, Manifest};
use lance::index::vector::pq::PQBuildParams;
use lance::index::vector::VectorIndexParams;
@@ -132,6 +134,12 @@ impl VectorIndex {
}
}
+#[derive(Debug, Deserialize)]
+pub struct VectorIndexStatistics {
+ pub num_indexed_rows: usize,
+ pub num_unindexed_rows: usize,
+}
+
#[cfg(test)]
mod tests {
use super::*;
diff --git a/rust/vectordb/src/table.rs b/rust/vectordb/src/table.rs
index fba001a1..0c370092 100644
--- a/rust/vectordb/src/table.rs
+++ b/rust/vectordb/src/table.rs
@@ -15,6 +15,7 @@
use chrono::Duration;
use lance::dataset::builder::DatasetBuilder;
use lance::index::scalar::ScalarIndexParams;
+use lance_index::optimize::OptimizeOptions;
use lance_index::IndexType;
use std::sync::Arc;
@@ -25,12 +26,12 @@ use lance::dataset::optimize::{
compact_files, CompactionMetrics, CompactionOptions, IndexRemapperOptions,
};
use lance::dataset::{Dataset, UpdateBuilder, WriteParams};
-use lance::index::DatasetIndexExt;
use lance::io::object_store::WrappingObjectStore;
+use lance_index::DatasetIndexExt;
use std::path::Path;
use crate::error::{Error, Result};
-use crate::index::vector::{VectorIndex, VectorIndexBuilder};
+use crate::index::vector::{VectorIndex, VectorIndexBuilder, VectorIndexStatistics};
use crate::query::Query;
use crate::utils::{PatchReadParam, PatchWriteParam};
use crate::WriteMode;
@@ -273,10 +274,9 @@ impl Table {
Ok(())
}
- pub async fn optimize_indices(&mut self) -> Result<()> {
+ pub async fn optimize_indices(&mut self, options: &OptimizeOptions) -> Result<()> {
let mut dataset = self.dataset.as_ref().clone();
-
- dataset.optimize_indices().await?;
+ dataset.optimize_indices(options).await?;
Ok(())
}
@@ -426,11 +426,17 @@ impl Table {
}
pub async fn count_indexed_rows(&self, index_uuid: &str) -> Result