pub struct IndexSchemaBuilder { /* private fields */ }Expand description
Builder for IndexSchema.
Implementations§
Source§impl IndexSchemaBuilder
impl IndexSchemaBuilder
pub fn index_name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Sourcepub fn index_type<VALUE: Into<IndexType>>(&mut self, value: VALUE) -> &mut Self
pub fn index_type<VALUE: Into<IndexType>>(&mut self, value: VALUE) -> &mut Self
The currently supported types are as follows: scalar index: SECONDARY, vector index: HNSW, FLAT
Sourcepub fn metric_type<VALUE: Into<MetricType>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn metric_type<VALUE: Into<MetricType>>( &mut self, value: VALUE, ) -> &mut Self
Distance measurement type of vector index, L2: Euclidean distance, IP: Inner product distance, COSINE: Cosine distance.
Sourcepub fn params(&mut self, value: VectorIndexParams) -> &mut Self
pub fn params(&mut self, value: VectorIndexParams) -> &mut Self
Parameter details of vector index
Sourcepub fn field<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn field<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
The target field name that the index acts on
Sourcepub fn auto_build<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn auto_build<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
is auto build index
pub fn auto_build_policy(&mut self, value: AutoBuildPolicy) -> &mut Self
Sourcepub fn build(&self) -> Result<IndexSchema, IndexSchemaBuilderError>
pub fn build(&self) -> Result<IndexSchema, IndexSchemaBuilderError>
Trait Implementations§
Source§impl Clone for IndexSchemaBuilder
impl Clone for IndexSchemaBuilder
Source§fn clone(&self) -> IndexSchemaBuilder
fn clone(&self) -> IndexSchemaBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for IndexSchemaBuilder
impl RefUnwindSafe for IndexSchemaBuilder
impl Send for IndexSchemaBuilder
impl Sync for IndexSchemaBuilder
impl Unpin for IndexSchemaBuilder
impl UnwindSafe for IndexSchemaBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more