pub struct TrieveKnowledgeBaseSearchPlan {
pub top_k: Option<f64>,
pub remove_stop_words: Option<bool>,
pub score_threshold: Option<f64>,
pub search_type: SearchTypeTrue,
}
Fields§
§top_k: Option<f64>
Specifies the number of top chunks to return. This corresponds to the page_size
parameter in Trieve.
remove_stop_words: Option<bool>
If true, stop words (specified in server/src/stop-words.txt in the git repo) will be removed. This will preserve queries that are entirely stop words.
score_threshold: Option<f64>
This is the score threshold to filter out chunks with a score below the threshold for cosine distance metric. For Manhattan Distance, Euclidean Distance, and Dot Product, it will filter out scores above the threshold distance. This threshold applies before weight and bias modifications. If not specified, this defaults to no threshold. A threshold of 0 will default to no threshold.
search_type: SearchTypeTrue
This is the search method used when searching for relevant chunks from the vector store.
Implementations§
Source§impl TrieveKnowledgeBaseSearchPlan
impl TrieveKnowledgeBaseSearchPlan
pub fn new(search_type: SearchTypeTrue) -> TrieveKnowledgeBaseSearchPlan
Trait Implementations§
Source§impl Clone for TrieveKnowledgeBaseSearchPlan
impl Clone for TrieveKnowledgeBaseSearchPlan
Source§fn clone(&self) -> TrieveKnowledgeBaseSearchPlan
fn clone(&self) -> TrieveKnowledgeBaseSearchPlan
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Default for TrieveKnowledgeBaseSearchPlan
impl Default for TrieveKnowledgeBaseSearchPlan
Source§fn default() -> TrieveKnowledgeBaseSearchPlan
fn default() -> TrieveKnowledgeBaseSearchPlan
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TrieveKnowledgeBaseSearchPlan
impl<'de> Deserialize<'de> for TrieveKnowledgeBaseSearchPlan
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 TrieveKnowledgeBaseSearchPlan
impl PartialEq for TrieveKnowledgeBaseSearchPlan
Source§fn eq(&self, other: &TrieveKnowledgeBaseSearchPlan) -> bool
fn eq(&self, other: &TrieveKnowledgeBaseSearchPlan) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for TrieveKnowledgeBaseSearchPlan
Auto Trait Implementations§
impl Freeze for TrieveKnowledgeBaseSearchPlan
impl RefUnwindSafe for TrieveKnowledgeBaseSearchPlan
impl Send for TrieveKnowledgeBaseSearchPlan
impl Sync for TrieveKnowledgeBaseSearchPlan
impl Unpin for TrieveKnowledgeBaseSearchPlan
impl UnwindSafe for TrieveKnowledgeBaseSearchPlan
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