pub struct IndexDoc {
pub node_id: String,
pub node_type: String,
pub parent_id: Option<String>,
pub marks: Vec<String>,
pub marks_json: String,
pub attrs_flat: Vec<(String, String)>,
pub attrs_json: String,
pub text: Option<String>,
pub path: Vec<String>,
pub order_i64: Option<i64>,
pub created_at_i64: Option<i64>,
pub updated_at_i64: Option<i64>,
}Expand description
扁平化后的索引文档(写入后端的基础结构)
Fields§
§node_id: String§node_type: String§parent_id: Option<String>§marks: Vec<String>mark 类型列表(用于简单的 “包含某 mark” 查询)
marks_json: String完整的 marks JSON(用于带属性的精确查询)
attrs_flat: Vec<(String, String)>扁平化的顶层属性(用于简单查询)
attrs_json: String完整的 attrs JSON(用于嵌套属性查询)
text: Option<String>§path: Vec<String>§order_i64: Option<i64>§created_at_i64: Option<i64>§updated_at_i64: Option<i64>Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IndexDoc
impl RefUnwindSafe for IndexDoc
impl Send for IndexDoc
impl Sync for IndexDoc
impl Unpin for IndexDoc
impl UnsafeUnpin for IndexDoc
impl UnwindSafe for IndexDoc
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