pub struct CollectionSchema { /* private fields */ }Expand description
Schema definition for a collection, containing field definitions.
Implementations§
Source§impl CollectionSchema
impl CollectionSchema
Sourcepub fn builder(name: &str) -> CollectionSchemaBuilder
pub fn builder(name: &str) -> CollectionSchemaBuilder
Returns a builder for constructing a collection schema.
Sourcepub fn add_field(&mut self, field: &FieldSchema) -> Result<()>
pub fn add_field(&mut self, field: &FieldSchema) -> Result<()>
Adds a field to the schema.
Sourcepub fn drop_field(&mut self, name: &str) -> Result<()>
pub fn drop_field(&mut self, name: &str) -> Result<()>
Drops a field from the schema.
Sourcepub fn add_index(
&mut self,
field_name: &str,
params: &IndexParams,
) -> Result<()>
pub fn add_index( &mut self, field_name: &str, params: &IndexParams, ) -> Result<()>
Adds an index to a field.
Sourcepub fn drop_index(&mut self, field_name: &str) -> Result<()>
pub fn drop_index(&mut self, field_name: &str) -> Result<()>
Drops an index from a field.
Sourcepub fn set_max_doc_count_per_segment(&mut self, count: u64) -> Result<()>
pub fn set_max_doc_count_per_segment(&mut self, count: u64) -> Result<()>
Sets the maximum document count per segment.
Sourcepub fn max_doc_count_per_segment(&self) -> u64
pub fn max_doc_count_per_segment(&self) -> u64
Returns the maximum document count per segment.
Trait Implementations§
Source§impl Drop for CollectionSchema
impl Drop for CollectionSchema
Auto Trait Implementations§
impl !Send for CollectionSchema
impl !Sync for CollectionSchema
impl Freeze for CollectionSchema
impl RefUnwindSafe for CollectionSchema
impl Unpin for CollectionSchema
impl UnsafeUnpin for CollectionSchema
impl UnwindSafe for CollectionSchema
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