pub struct SearchRequest {
pub database_id: String,
pub embeddings: Vec<Vec<f32>>,
pub num_results: usize,
}Expand description
Request structure for searching similar chunks
This struct defines the format for requests to the search endpoint. It contains a database identifier, query embeddings, and the number of results to return.
Fields§
§database_id: StringIdentifier for the database to search in
This identifier specifies which database to search in. Each database has its own SQLite table and USearch index.
embeddings: Vec<Vec<f32>>List of query embeddings to search for
These are the vector embeddings to search for similar chunks. Multiple query embeddings can be provided in a single request.
num_results: usizeMaximum number of results to return per query
This limits the number of results returned for each query embedding.
Trait Implementations§
Source§impl ApiComponent for SearchRequest
impl ApiComponent for SearchRequest
Source§fn child_schemas() -> Vec<(String, ReferenceOr<Schema>)>
fn child_schemas() -> Vec<(String, ReferenceOr<Schema>)>
Contains children schemas for this operation
Each child can also contain child schemas
fn schema() -> Option<(String, ReferenceOr<Schema>)>
fn content_type() -> String
fn required() -> bool
fn raw_schema() -> Option<ReferenceOr<Schema>>
fn securities() -> BTreeMap<String, SecurityScheme>
fn security_requirement_name() -> Option<String>
fn request_body() -> Option<RequestBody>
fn error_responses() -> Vec<(String, Response)>
fn error_schemas() -> BTreeMap<String, (String, ReferenceOr<Schema>)>
fn responses(_content_type: Option<String>) -> Option<Responses>
fn parameters() -> Vec<Parameter>
Source§impl Clone for SearchRequest
impl Clone for SearchRequest
Source§fn clone(&self) -> SearchRequest
fn clone(&self) -> SearchRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SearchRequest
impl Debug for SearchRequest
Source§impl<'de> Deserialize<'de> for SearchRequest
impl<'de> Deserialize<'de> for SearchRequest
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 JsonSchema for SearchRequest
impl JsonSchema for SearchRequest
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for SearchRequest
impl RefUnwindSafe for SearchRequest
impl Send for SearchRequest
impl Sync for SearchRequest
impl Unpin for SearchRequest
impl UnwindSafe for SearchRequest
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