pub struct SortOptions {
pub location_bias: Option<Option<Box<GeoInfoWithBias>>>,
pub sort_by: Option<Option<Box<QdrantSortBy>>>,
pub tag_weights: Option<Option<HashMap<String, f32>>>,
pub use_weights: Option<Option<bool>>,
}
Expand description
SortOptions : Sort Options lets you specify different methods to rerank the chunks in the result set. If not specified, this defaults to the score of the chunks.
Fields§
§location_bias: Option<Option<Box<GeoInfoWithBias>>>
§sort_by: Option<Option<Box<QdrantSortBy>>>
§tag_weights: Option<Option<HashMap<String, f32>>>
Tag weights is a JSON object which can be used to boost the ranking of chunks with certain tags. This is useful for when you want to be able to bias towards chunks with a certain tag on the fly. The keys are the tag names and the values are the weights.
use_weights: Option<Option<bool>>
Set use_weights to true to use the weights of the chunks in the result set in order to sort them. If not specified, this defaults to true.
Implementations§
Source§impl SortOptions
impl SortOptions
Sourcepub fn new() -> SortOptions
pub fn new() -> SortOptions
Sort Options lets you specify different methods to rerank the chunks in the result set. If not specified, this defaults to the score of the chunks.
Trait Implementations§
Source§impl Clone for SortOptions
impl Clone for SortOptions
Source§fn clone(&self) -> SortOptions
fn clone(&self) -> SortOptions
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 SortOptions
impl Debug for SortOptions
Source§impl Default for SortOptions
impl Default for SortOptions
Source§fn default() -> SortOptions
fn default() -> SortOptions
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SortOptions
impl<'de> Deserialize<'de> for SortOptions
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 SortOptions
impl PartialEq for SortOptions
Source§impl Serialize for SortOptions
impl Serialize for SortOptions
impl StructuralPartialEq for SortOptions
Auto Trait Implementations§
impl Freeze for SortOptions
impl RefUnwindSafe for SortOptions
impl Send for SortOptions
impl Sync for SortOptions
impl Unpin for SortOptions
impl UnwindSafe for SortOptions
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