From 6473f26a66efa1340a0a52dd45a21ac6ab47c682 Mon Sep 17 00:00:00 2001 From: jacketsj Date: Mon, 14 Oct 2024 20:37:02 -0700 Subject: [PATCH] chore: make ivf fields public (#3003) --- rust/lance/src/index/vector/ivf.rs | 5 +++-- rust/lance/src/io/exec/knn.rs | 10 ++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/rust/lance/src/index/vector/ivf.rs b/rust/lance/src/index/vector/ivf.rs index ae68b0582d..256eb4f7f8 100644 --- a/rust/lance/src/index/vector/ivf.rs +++ b/rust/lance/src/index/vector/ivf.rs @@ -94,11 +94,12 @@ pub mod io; pub mod v2; /// IVF Index. +/// WARNING: Internal API with no stability guarantees. pub struct IVFIndex { uuid: String, /// Ivf model - ivf: IvfModel, + pub ivf: IvfModel, reader: Arc, @@ -107,7 +108,7 @@ pub struct IVFIndex { partition_locks: PartitionLoadLock, - metric_type: MetricType, + pub metric_type: MetricType, // The session cache holds an Arc to this object so we need to // hold a weak pointer to avoid cycles diff --git a/rust/lance/src/io/exec/knn.rs b/rust/lance/src/io/exec/knn.rs index 18e6189a58..5bba800952 100644 --- a/rust/lance/src/io/exec/knn.rs +++ b/rust/lance/src/io/exec/knn.rs @@ -70,6 +70,8 @@ fn check_vector_column(schema: &Schema, column: &str) -> Result<()> { /// Preconditions: /// - `input` schema must contains `query.column`, /// - The column must be a vector column. +/// +/// WARNING: Internal API with no stability guarantees. #[derive(Debug)] pub struct KNNVectorDistanceExec { /// Inner input node. @@ -274,15 +276,15 @@ pub fn new_knn_exec( /// ``` #[derive(Debug)] pub struct ANNIvfPartitionExec { - dataset: Arc, + pub dataset: Arc, /// The vector query to execute. - query: Query, + pub query: Query, /// The UUIDs of the indices to search. - index_uuids: Vec, + pub index_uuids: Vec, - properties: PlanProperties, + pub properties: PlanProperties, } impl ANNIvfPartitionExec {