pub struct Hit {
pub doctype: Option<String>,
pub name: Option<String>,
pub project: Option<String>,
pub provider: Option<String>,
pub score: Option<f64>,
pub title: Option<String>,
pub url: Option<String>,
}Fields§
§doctype: Option<String>DocType is which kind of knowledge matched: kb-page (a wiki page), kb-memory (a unit of agent memory) or kb-source (a document a connector ingested). Those three are the whole indexed set, and searchIn.DocTypes filters on them.
name: Option<String>Name is the document’s name in the framework store — the id to read or open it with. Unique per (org, doctype), so it identifies the document with DocType and not alone.
project: Option<String>Project is the project scope the document was saved under. Absent for a document saved with none, which is also why a project-scoped query cannot reach it.
provider: Option<String>Provider is the connector that ingested the document — github, slack, google or notion. Absent for a page or memory written in the product, which came from no connector.
score: Option<f64>Score is the cosine similarity between the query’s embedding and the document’s, from -1 to 1, higher being closer — the collection is created with Cosine distance. Hits arrive ordered by it, descending. There is no absolute cutoff: what counts as a good score moves with the query and the embedding model, so compare scores within one response and not across queries.
title: Option<String>Title is the document’s title as it was indexed. Empty for a document saved without one; it is a label to show, never the id (that is Name).
url: Option<String>URL is the document’s link back into the app it was ingested from. Absent when the indexed payload carries none, which is the normal case for pages and memories.