pub enum SearchCommand {
Similar {
vector: Vec<f32>,
text: Option<String>,
provider: Option<String>,
collection: String,
limit: usize,
min_score: f32,
vector_param: Option<usize>,
limit_param: Option<usize>,
min_score_param: Option<usize>,
text_param: Option<usize>,
},
Text {
query: String,
collection: Option<String>,
limit: usize,
fuzzy: bool,
limit_param: Option<usize>,
},
Hybrid {
vector: Option<Vec<f32>>,
query: Option<String>,
collection: String,
limit: usize,
limit_param: Option<usize>,
},
Multimodal {
query: String,
collection: Option<String>,
limit: usize,
limit_param: Option<usize>,
},
Index {
index: String,
value: String,
collection: Option<String>,
limit: usize,
exact: bool,
limit_param: Option<usize>,
},
Context {
query: String,
field: Option<String>,
collection: Option<String>,
limit: usize,
depth: usize,
limit_param: Option<usize>,
},
SpatialRadius {
center_lat: f64,
center_lon: f64,
radius_km: f64,
collection: String,
column: String,
limit: usize,
limit_param: Option<usize>,
},
SpatialBbox {
min_lat: f64,
min_lon: f64,
max_lat: f64,
max_lon: f64,
collection: String,
column: String,
limit: usize,
limit_param: Option<usize>,
},
SpatialNearest {
lat: f64,
lon: f64,
k: usize,
collection: String,
column: String,
k_param: Option<usize>,
},
}Expand description
Search command issued via SQL-like syntax
Variants§
Similar
SEARCH SIMILAR [v1, v2, …] | $N | TEXT ‘query’ [COLLECTION col] [LIMIT n] [MIN_SCORE f] [USING provider]
Fields
vector_param: Option<usize>$N placeholder for the vector slot. Some(idx) when the SQL
used SEARCH SIMILAR $N ...; the binder substitutes the
user-supplied Value::Vector and clears this back to None.
Runtime executors assert this is None post-bind.
limit_param: Option<usize>$N placeholder for the LIMIT slot (issue #361). The binder
substitutes the user-supplied positive integer into limit
and clears this back to None.
Text
SEARCH TEXT ‘query’ [COLLECTION col] [LIMIT n] [FUZZY]
Fields
Hybrid
SEARCH HYBRID [vector] [TEXT ‘query’] COLLECTION col [LIMIT n]
Fields
Multimodal
SEARCH MULTIMODAL ‘key_or_query’ [COLLECTION col] [LIMIT n]
Fields
Index
SEARCH INDEX index VALUE ‘value’ [COLLECTION col] [LIMIT n] [EXACT]
Fields
Context
SEARCH CONTEXT ‘query’ [FIELD field] [COLLECTION col] [LIMIT n] [DEPTH n]
Fields
SpatialRadius
SEARCH SPATIAL RADIUS lat lon radius_km COLLECTION col COLUMN col [LIMIT n]
Fields
SpatialBbox
SEARCH SPATIAL BBOX min_lat min_lon max_lat max_lon COLLECTION col COLUMN col [LIMIT n]
Fields
SpatialNearest
SEARCH SPATIAL NEAREST lat lon K n COLLECTION col COLUMN col
Trait Implementations§
Source§impl Clone for SearchCommand
impl Clone for SearchCommand
Source§fn clone(&self) -> SearchCommand
fn clone(&self) -> SearchCommand
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for SearchCommand
impl RefUnwindSafe for SearchCommand
impl Send for SearchCommand
impl Sync for SearchCommand
impl Unpin for SearchCommand
impl UnsafeUnpin for SearchCommand
impl UnwindSafe for SearchCommand
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request