Skip to content

Commit

Permalink
chore: make ivf fields public (#3003)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacketsj authored Oct 15, 2024
1 parent 81554cd commit 6473f26
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions rust/lance/src/index/vector/ivf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<dyn Reader>,

Expand All @@ -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
Expand Down
10 changes: 6 additions & 4 deletions rust/lance/src/io/exec/knn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -274,15 +276,15 @@ pub fn new_knn_exec(
/// ```
#[derive(Debug)]
pub struct ANNIvfPartitionExec {
dataset: Arc<Dataset>,
pub dataset: Arc<Dataset>,

/// The vector query to execute.
query: Query,
pub query: Query,

/// The UUIDs of the indices to search.
index_uuids: Vec<String>,
pub index_uuids: Vec<String>,

properties: PlanProperties,
pub properties: PlanProperties,
}

impl ANNIvfPartitionExec {
Expand Down

0 comments on commit 6473f26

Please sign in to comment.