pub struct CollectionSchema {
pub name: String,
pub fields: Vec<FieldSchema>,
pub vectors: Vec<VectorSchema>,
pub max_doc_count_per_segment: u64,
}Expand description
Collection schema containing scalar and vector fields.
Fields§
§name: String§fields: Vec<FieldSchema>§vectors: Vec<VectorSchema>§max_doc_count_per_segment: u64Implementations§
Source§impl CollectionSchema
impl CollectionSchema
pub fn new(name: &str) -> Result<Self>
pub fn builder(name: &str) -> CollectionSchemaBuilder
pub fn name(&self) -> &str
pub fn add_field(&mut self, field: &FieldSchema) -> Result<()>
pub fn add_vector_field(&mut self, field: &VectorSchema) -> Result<()>
pub fn has_field(&self, name: &str) -> bool
pub fn field(&self, name: &str) -> Option<&FieldSchema>
pub fn vector(&self, name: &str) -> Option<&VectorSchema>
pub fn has_index(&self, name: &str) -> bool
pub fn drop_field(&mut self, name: &str) -> 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 set_max_doc_count_per_segment(&mut self, count: u64) -> Result<()>
pub fn max_doc_count_per_segment(&self) -> u64
pub fn validate(&self) -> Result<()>
pub fn digest(&self) -> String
pub fn fields(&self) -> &[FieldSchema]
pub fn vectors(&self) -> &[VectorSchema]
Trait Implementations§
Source§impl Clone for CollectionSchema
impl Clone for CollectionSchema
Source§impl Debug for CollectionSchema
impl Debug for CollectionSchema
Source§impl<'de> Deserialize<'de> for CollectionSchema
impl<'de> Deserialize<'de> for CollectionSchema
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CollectionSchema
impl PartialEq for CollectionSchema
Source§impl Serialize for CollectionSchema
impl Serialize for CollectionSchema
impl StructuralPartialEq for CollectionSchema
Auto Trait Implementations§
impl Freeze for CollectionSchema
impl RefUnwindSafe for CollectionSchema
impl Send for CollectionSchema
impl Sync 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more