Skip to main content

Index

Type Alias Index 

Source
pub type Index = IndexMetadata;
👎Deprecated since 0.36.1:

Use IndexMetadata instead

Aliased Type§

pub struct Index {
    pub uuid: Uuid,
    pub fields: Vec<i32>,
    pub covering_fields: Vec<i32>,
    pub name: String,
    pub dataset_version: u64,
    pub fragment_bitmap: Option<RoaringBitmap>,
    pub index_details: Option<Arc<Any>>,
    pub index_version: i32,
    pub created_at: Option<DateTime<Utc>>,
    pub base_id: Option<u32>,
    pub files: Option<Vec<IndexFile>>,
}

Fields§

§uuid: Uuid

Unique ID across all dataset versions.

§fields: Vec<i32>

Fields to build the index.

fields[0] is always a column the index is keyed on. Trailing entries may instead be merely carried, not keyed on – see Self::covering_fields.

§covering_fields: Vec<i32>

Fields whose values this index carries but is not keyed on.

Always a suffix of Self::fields, and never all of it, so fields[0] is always a column the index is keyed on. Empty for an index that carries no extra columns.

These ids also appear in Self::fields. That is deliberate: every consumer that reads fields as the index’s dependency set then covers them with no change.

§name: String

Human readable index name

§dataset_version: u64

The version of the dataset this index was last updated on

This is set when the index is created (based on the version used to train the index) This is updated when the index is updated or remapped

§fragment_bitmap: Option<RoaringBitmap>

The fragment ids this index covers.

This may contain fragment ids that no longer exist in the dataset.

If this is None, then this is unknown.

§index_details: Option<Arc<Any>>

Metadata specific to the index type

This is an Option because older versions of Lance may not have this defined. However, it should always be present in newer versions.

§index_version: i32

The index version.

§created_at: Option<DateTime<Utc>>

Timestamp when the index was created

This field is optional for backward compatibility. For existing indices created before this field was added, this will be None.

§base_id: Option<u32>

The base path index of the index files. Used when the index is imported or referred from another dataset. Lance uses it as key of the base_paths field in Manifest to determine the actual base path of the index files.

§files: Option<Vec<IndexFile>>

List of files and their sizes for this index segment. This enables skipping HEAD calls when opening indices and provides visibility into index storage size via describe_indices(). This is None if the file sizes are unknown. This happens for indices created before this field was added.