pub struct CollectionSchemaBuilder { /* private fields */ }Expand description
Builder for constructing a CollectionSchema with a fluent API.
Implementations§
Source§impl CollectionSchemaBuilder
impl CollectionSchemaBuilder
Sourcepub fn add_field(self, field: FieldSchema) -> Self
pub fn add_field(self, field: FieldSchema) -> Self
Adds a field to the schema.
Sourcepub fn add_vector_field(
self,
name: &str,
data_type: DataType,
dimension: u32,
index_params: IndexParams,
) -> Self
pub fn add_vector_field( self, name: &str, data_type: DataType, dimension: u32, index_params: IndexParams, ) -> Self
Adds a vector field with index parameters.
Sourcepub fn add_indexed_field(
self,
name: &str,
data_type: DataType,
index_params: IndexParams,
) -> Self
pub fn add_indexed_field( self, name: &str, data_type: DataType, index_params: IndexParams, ) -> Self
Adds a scalar field with an inverted index.
Sourcepub fn max_doc_count_per_segment(self, count: u64) -> Self
pub fn max_doc_count_per_segment(self, count: u64) -> Self
Sets the maximum document count per segment.
Sourcepub fn build(self) -> Result<CollectionSchema>
pub fn build(self) -> Result<CollectionSchema>
Builds the collection schema.
Auto Trait Implementations§
impl !Send for CollectionSchemaBuilder
impl !Sync for CollectionSchemaBuilder
impl Freeze for CollectionSchemaBuilder
impl RefUnwindSafe for CollectionSchemaBuilder
impl Unpin for CollectionSchemaBuilder
impl UnsafeUnpin for CollectionSchemaBuilder
impl UnwindSafe for CollectionSchemaBuilder
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