#[non_exhaustive]pub struct IndexDatapoint {
pub datapoint_id: String,
pub feature_vector: Vec<f32>,
pub sparse_embedding: Option<SparseEmbedding>,
pub restricts: Vec<Restriction>,
pub numeric_restricts: Vec<NumericRestriction>,
pub crowding_tag: Option<CrowdingTag>,
/* private fields */
}Expand description
A datapoint of Index.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.datapoint_id: StringRequired. Unique identifier of the datapoint.
feature_vector: Vec<f32>Required. Feature embedding vector for dense index. An array of numbers with the length of [NearestNeighborSearchConfig.dimensions].
sparse_embedding: Option<SparseEmbedding>Optional. Feature embedding vector for sparse index.
restricts: Vec<Restriction>Optional. List of Restrict of the datapoint, used to perform “restricted searches” where boolean rule are used to filter the subset of the database eligible for matching. This uses categorical tokens. See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
numeric_restricts: Vec<NumericRestriction>Optional. List of Restrict of the datapoint, used to perform “restricted searches” where boolean rule are used to filter the subset of the database eligible for matching. This uses numeric comparisons.
crowding_tag: Option<CrowdingTag>Optional. CrowdingTag of the datapoint, the number of neighbors to return in each crowding can be configured during query.
Implementations§
Source§impl IndexDatapoint
impl IndexDatapoint
pub fn new() -> Self
Sourcepub fn set_datapoint_id<T: Into<String>>(self, v: T) -> Self
pub fn set_datapoint_id<T: Into<String>>(self, v: T) -> Self
Sets the value of datapoint_id.
Sourcepub fn set_feature_vector<T, V>(self, v: T) -> Self
pub fn set_feature_vector<T, V>(self, v: T) -> Self
Sets the value of feature_vector.
Sourcepub fn set_sparse_embedding<T: Into<Option<SparseEmbedding>>>(
self,
v: T,
) -> Self
pub fn set_sparse_embedding<T: Into<Option<SparseEmbedding>>>( self, v: T, ) -> Self
Sets the value of sparse_embedding.
Sourcepub fn set_restricts<T, V>(self, v: T) -> Self
pub fn set_restricts<T, V>(self, v: T) -> Self
Sets the value of restricts.
Sourcepub fn set_numeric_restricts<T, V>(self, v: T) -> Self
pub fn set_numeric_restricts<T, V>(self, v: T) -> Self
Sets the value of numeric_restricts.
Sourcepub fn set_crowding_tag<T: Into<Option<CrowdingTag>>>(self, v: T) -> Self
pub fn set_crowding_tag<T: Into<Option<CrowdingTag>>>(self, v: T) -> Self
Sets the value of crowding_tag.
Trait Implementations§
Source§impl Clone for IndexDatapoint
impl Clone for IndexDatapoint
Source§fn clone(&self) -> IndexDatapoint
fn clone(&self) -> IndexDatapoint
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more