pub struct MultiQuery {
pub query: String,
pub weight: f32,
}
Expand description
MultiQuery : MultiQuery allows you to construct a dense vector from multiple queries with a weighted sum. This is useful for when you want to emphasize certain features of the query. This only works with Semantic Search and is not compatible with cross encoder re-ranking or highlights.
Fields§
§query: String
Query to embed for the final weighted sum vector.
weight: f32
Float value which is applies as a multiplier to the query vector when summing.
Implementations§
Source§impl MultiQuery
impl MultiQuery
Sourcepub fn new(query: String, weight: f32) -> MultiQuery
pub fn new(query: String, weight: f32) -> MultiQuery
MultiQuery allows you to construct a dense vector from multiple queries with a weighted sum. This is useful for when you want to emphasize certain features of the query. This only works with Semantic Search and is not compatible with cross encoder re-ranking or highlights.
Trait Implementations§
Source§impl Clone for MultiQuery
impl Clone for MultiQuery
Source§fn clone(&self) -> MultiQuery
fn clone(&self) -> MultiQuery
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 MultiQuery
impl Debug for MultiQuery
Source§impl Default for MultiQuery
impl Default for MultiQuery
Source§fn default() -> MultiQuery
fn default() -> MultiQuery
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MultiQuery
impl<'de> Deserialize<'de> for MultiQuery
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 PartialEq for MultiQuery
impl PartialEq for MultiQuery
Source§impl Serialize for MultiQuery
impl Serialize for MultiQuery
impl StructuralPartialEq for MultiQuery
Auto Trait Implementations§
impl Freeze for MultiQuery
impl RefUnwindSafe for MultiQuery
impl Send for MultiQuery
impl Sync for MultiQuery
impl Unpin for MultiQuery
impl UnwindSafe for MultiQuery
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