pub struct CollectionSchema { /* private fields */ }Implementations§
Source§impl CollectionSchema
impl CollectionSchema
Sourcepub fn builder(name: impl Into<String>) -> CollectionSchemaBuilder
pub fn builder(name: impl Into<String>) -> CollectionSchemaBuilder
Start building a collection schema with the given name.
Source§impl CollectionSchema
impl CollectionSchema
pub fn new(name: &str) -> Result<Self>
pub fn name(&self) -> Option<String>
pub fn set_name(&mut self, name: &str) -> Result<()>
pub fn add_field(&mut self, field: &FieldSchema) -> Result<()>
pub fn alter_field( &mut self, field_name: &str, new_field: &FieldSchema, ) -> Result<()>
pub fn drop_field(&mut self, field_name: &str) -> Result<()>
pub fn has_field(&self, field_name: &str) -> bool
pub fn field(&self, field_name: &str) -> Result<Option<FieldSchemaRef<'_>>>
pub fn forward_field( &self, field_name: &str, ) -> Result<Option<FieldSchemaRef<'_>>>
pub fn vector_field( &self, field_name: &str, ) -> Result<Option<FieldSchemaRef<'_>>>
pub fn forward_fields(&self) -> Result<Vec<FieldSchemaRef<'_>>>
pub fn forward_fields_with_index(&self) -> Result<Vec<FieldSchemaRef<'_>>>
pub fn vector_fields(&self) -> Result<Vec<FieldSchemaRef<'_>>>
pub fn forward_field_names(&self) -> Result<Vec<String>>
pub fn forward_field_names_with_index(&self) -> Result<Vec<String>>
pub fn all_field_names(&self) -> Result<Vec<String>>
pub fn max_doc_count_per_segment(&self) -> u64
pub fn set_max_doc_count_per_segment(&mut self, n: u64) -> Result<()>
pub fn validate(&self) -> Result<()>
pub fn add_index( &mut self, field_name: &str, params: &IndexParams, ) -> Result<()>
pub fn drop_index(&mut self, field_name: &str) -> Result<()>
pub fn has_index(&self, field_name: &str) -> bool
Trait Implementations§
Source§impl Drop for CollectionSchema
impl Drop for CollectionSchema
impl Send for CollectionSchema
impl Sync for CollectionSchema
Auto Trait Implementations§
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