pub struct VectorizeClient { /* private fields */ }Expand description
Client for a user-defined Vectorize index.
Implementations§
Source§impl VectorizeClient
impl VectorizeClient
Sourcepub async fn upsert(&self, vectors: &[Value]) -> Result<Value, Error>
pub async fn upsert(&self, vectors: &[Value]) -> Result<Value, Error>
Insert or update vectors.
Returns mutation result with ok, optional count and mutationId.
Sourcepub async fn insert(&self, vectors: &[Value]) -> Result<Value, Error>
pub async fn insert(&self, vectors: &[Value]) -> Result<Value, Error>
Insert vectors (errors on duplicate ID — server returns 409).
Returns mutation result with ok, optional count and mutationId.
Sourcepub async fn search(
&self,
vector: &[f64],
top_k: usize,
filter: Option<&Value>,
namespace: Option<&str>,
return_values: Option<bool>,
return_metadata: Option<&str>,
) -> Result<Vec<HashMap<String, Value>>, Error>
pub async fn search( &self, vector: &[f64], top_k: usize, filter: Option<&Value>, namespace: Option<&str>, return_values: Option<bool>, return_metadata: Option<&str>, ) -> Result<Vec<HashMap<String, Value>>, Error>
Search for similar vectors.
Sourcepub async fn query_by_id(
&self,
vector_id: &str,
top_k: usize,
filter: Option<&Value>,
namespace: Option<&str>,
return_values: Option<bool>,
return_metadata: Option<&str>,
) -> Result<Vec<HashMap<String, Value>>, Error>
pub async fn query_by_id( &self, vector_id: &str, top_k: usize, filter: Option<&Value>, namespace: Option<&str>, return_values: Option<bool>, return_metadata: Option<&str>, ) -> Result<Vec<HashMap<String, Value>>, Error>
Search by an existing vector’s ID (Vectorize v2 only).
Sourcepub async fn get_by_ids(
&self,
ids: &[&str],
) -> Result<Vec<HashMap<String, Value>>, Error>
pub async fn get_by_ids( &self, ids: &[&str], ) -> Result<Vec<HashMap<String, Value>>, Error>
Retrieve vectors by their IDs.
Auto Trait Implementations§
impl Freeze for VectorizeClient
impl !RefUnwindSafe for VectorizeClient
impl Send for VectorizeClient
impl Sync for VectorizeClient
impl Unpin for VectorizeClient
impl UnsafeUnpin for VectorizeClient
impl !UnwindSafe for VectorizeClient
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