pub enum RankBy {
VectorSearch {
field: String,
method: VectorSearchMethod,
query_vector: Vec<f32>,
},
FullTextSearch {
field: String,
method: String,
query: String,
},
AttributeOrder {
field: String,
direction: SortDirection,
},
Sum(Vec<RankBy>),
Max(Vec<RankBy>),
Product {
weight: f32,
ranking: Box<RankBy>,
},
}Expand description
Ranking function for unified query API Supports vector search (ANN/kNN), full-text BM25, and attribute ordering
Variants§
VectorSearch
Vector search: [“vector_field”, “ANN”|“kNN”, [query_vector]] or simplified: [“ANN”, [query_vector]] for default “vector” field
FullTextSearch
Full-text BM25 search: [“text_field”, “BM25”, “query string”]
AttributeOrder
Attribute ordering: [“field_name”, “asc”|“desc”]
Sum(Vec<RankBy>)
Sum of multiple ranking functions: [“Sum”, […rankings]]
Max(Vec<RankBy>)
Max of multiple ranking functions: [“Max”, […rankings]]
Product
Product with weight: [“Product”, weight, ranking]
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RankBy
impl<'de> Deserialize<'de> for RankBy
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
Auto Trait Implementations§
impl Freeze for RankBy
impl RefUnwindSafe for RankBy
impl Send for RankBy
impl Sync for RankBy
impl Unpin for RankBy
impl UnsafeUnpin for RankBy
impl UnwindSafe for RankBy
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