pub struct SearchQuery {Show 15 fields
pub text: Option<String>,
pub node_type: Option<String>,
pub parent_id: Option<String>,
pub path_prefix: Option<String>,
pub marks: Vec<String>,
pub mark_attrs: Vec<(String, String, String)>,
pub attrs: Vec<(String, String)>,
pub limit: usize,
pub offset: usize,
pub sort_by: Option<String>,
pub sort_asc: bool,
pub include_descendants: bool,
pub range_field: Option<String>,
pub range_min: Option<i64>,
pub range_max: Option<i64>,
}Expand description
查询条件
Fields§
§text: Option<String>全文查询(走 FTS5)
node_type: Option<String>节点类型精确匹配
parent_id: Option<String>父节点精确匹配
path_prefix: Option<String>路径前缀匹配(如 “/root/section”)
marks: Vec<String>标记类型(简单查询:只检查是否包含某类型 marks)
mark_attrs: Vec<(String, String, String)>带属性的精确 mark 查询(mark_type, attr_key, attr_value)
attrs: Vec<(String, String)>JSON 属性匹配(支持复杂查询)
limit: usize返回条数限制
offset: usize偏移量
sort_by: Option<String>排序字段
sort_asc: bool排序方向 true=升序,false=降序
include_descendants: bool树形查询:返回子树所有节点
range_field: Option<String>范围查询
range_min: Option<i64>§range_max: Option<i64>Trait Implementations§
Source§impl Clone for SearchQuery
impl Clone for SearchQuery
Source§fn clone(&self) -> SearchQuery
fn clone(&self) -> SearchQuery
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SearchQuery
impl Debug for SearchQuery
Source§impl Default for SearchQuery
impl Default for SearchQuery
Source§fn default() -> SearchQuery
fn default() -> SearchQuery
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SearchQuery
impl RefUnwindSafe for SearchQuery
impl Send for SearchQuery
impl Sync for SearchQuery
impl Unpin for SearchQuery
impl UnsafeUnpin for SearchQuery
impl UnwindSafe for SearchQuery
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> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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