pub struct IngestDoc {
pub external_id: String,
pub label: String,
pub text: String,
pub props: Map<String, Value>,
}Expand description
One document staged for ingest. The scorer assigns the
external_id (e.g. session id, dialog id) and reads it back from
the retrieved hits via Hit::external_id so the adapter is
free to mint any internal id it likes.
Fields§
§external_id: StringStable per-bench identifier the scorer attaches to this doc.
Echoed back unchanged on the matching Hit.
label: StringScope label used to keep the corpus per-question / per-conv
isolated. mnem encodes this as the Node.ntype so the
retriever’s label filter scopes to a single question’s
haystack.
text: StringFree-form natural-language text the embedder consumes.
props: Map<String, Value>Optional structured property bag. Echoed onto the node / document for downstream filtering. Values are stringified by adapters that cannot store arbitrary JSON.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for IngestDoc
impl<'de> Deserialize<'de> for IngestDoc
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 IngestDoc
impl RefUnwindSafe for IngestDoc
impl Send for IngestDoc
impl Sync for IngestDoc
impl Unpin for IngestDoc
impl UnsafeUnpin for IngestDoc
impl UnwindSafe for IngestDoc
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,
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