pub struct SearchRequest {Show 14 fields
pub query: String,
pub filter: ReadFilter,
pub kinds: Vec<RecordKind>,
pub limit: usize,
pub candidate_limit: Option<usize>,
pub embed_space: Option<String>,
pub text_weight: f64,
pub prune: Option<GraphPrune>,
pub text: bool,
pub vector: bool,
pub rerank: bool,
pub with_total: bool,
pub match_field: MatchField,
pub top_chunks_per_note: usize,
}Fields§
§query: String§filter: ReadFilter§kinds: Vec<RecordKind>§limit: usize§candidate_limit: Option<usize>§embed_space: Option<String>走向量路时用哪条向量空间;库用该空间注册的回调嵌入查询词,宿主不接触向量。
text_weight: f64§prune: Option<GraphPrune>§text: bool本次是否走全文路。
vector: bool本次是否走向量路(需要 embed_space)。
rerank: bool本次是否重排;未注册重排回调时被忽略。
with_total: bool是否额外返回过滤后的匹配总量。
match_field: MatchField本次全文路限定在哪一列命中:all(默认,正文+名字)、text、name、path。
top_chunks_per_note: usize切片折叠后,每条命中最多聚合这一篇里排名最高的几片(含本条)到 top_chunks;
0 表示不聚合,只留排名最高的那一片。只看名字/目录列时不做聚合(那两列是笔记级的)。
Trait Implementations§
Source§impl Clone for SearchRequest
impl Clone for SearchRequest
Source§impl Debug for SearchRequest
impl Debug for SearchRequest
Source§impl Default for SearchRequest
impl Default for SearchRequest
Source§impl<'de> Deserialize<'de> for SearchRequestwhere
SearchRequest: Default,
impl<'de> Deserialize<'de> for SearchRequestwhere
SearchRequest: Default,
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 SearchRequest
impl RefUnwindSafe for SearchRequest
impl Send for SearchRequest
impl Sync for SearchRequest
impl Unpin for SearchRequest
impl UnsafeUnpin for SearchRequest
impl UnwindSafe for SearchRequest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> Fruit for T
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> ⓘ
Converts
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> ⓘ
Converts
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 more