pub struct PayloadIndexManager { /* private fields */ }Expand description
Manager for payload indices
Implementations§
Source§impl PayloadIndexManager
impl PayloadIndexManager
Sourcepub fn create_index(&mut self, field: &str, index_type: IndexType) -> Result<()>
pub fn create_index(&mut self, field: &str, index_type: IndexType) -> Result<()>
Create an index on a field
Sourcepub fn drop_index(&mut self, field: &str) -> Result<()>
pub fn drop_index(&mut self, field: &str) -> Result<()>
Drop an index
Sourcepub fn get_index(&self, field: &str) -> Option<&PayloadIndex>
pub fn get_index(&self, field: &str) -> Option<&PayloadIndex>
Get an index by field name
Sourcepub fn get_index_mut(&mut self, field: &str) -> Option<&mut PayloadIndex>
pub fn get_index_mut(&mut self, field: &str) -> Option<&mut PayloadIndex>
Get a mutable index by field name
Sourcepub fn index_payload(&mut self, vector_id: &str, payload: &Value) -> Result<()>
pub fn index_payload(&mut self, vector_id: &str, payload: &Value) -> Result<()>
Index a payload for a vector
Sourcepub fn remove_payload(&mut self, vector_id: &str, payload: &Value) -> Result<()>
pub fn remove_payload(&mut self, vector_id: &str, payload: &Value) -> Result<()>
Remove a payload from all indices
Sourcepub fn clear_vector(&mut self, vector_id: &str)
pub fn clear_vector(&mut self, vector_id: &str)
Clear all entries for a vector ID from all indices
Sourcepub fn indexed_fields(&self) -> Vec<String>
pub fn indexed_fields(&self) -> Vec<String>
Get all indexed fields
Sourcepub fn index_count(&self) -> usize
pub fn index_count(&self) -> usize
Get the number of indices
Trait Implementations§
Source§impl Debug for PayloadIndexManager
impl Debug for PayloadIndexManager
Source§impl Default for PayloadIndexManager
impl Default for PayloadIndexManager
Source§fn default() -> PayloadIndexManager
fn default() -> PayloadIndexManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PayloadIndexManager
impl RefUnwindSafe for PayloadIndexManager
impl Send for PayloadIndexManager
impl Sync for PayloadIndexManager
impl Unpin for PayloadIndexManager
impl UnwindSafe for PayloadIndexManager
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