pub struct Document {Show 13 fields
pub id: String,
pub source: String,
pub source_id: String,
pub source_url: Option<String>,
pub title: Option<String>,
pub author: Option<String>,
pub created_at: i64,
pub updated_at: i64,
pub content_type: String,
pub body: String,
pub metadata_json: String,
pub raw_json: Option<String>,
pub dedup_hash: String,
}Expand description
Normalized document stored in the documents table.
Created during ingestion by normalizing a SourceItem. Each document
is uniquely identified by the (source, source_id) pair, and carries
a dedup_hash (SHA-256 of source + source_id + updated_at + body) to
detect content changes.
Timestamps are stored as Unix epoch seconds (i64) for efficient comparison and indexing.
Fields§
§id: StringUUID v4 primary key.
source: StringConnector name that produced this document.
source_id: StringUnique identifier within the source.
source_url: Option<String>Web-browsable URL, if available.
title: Option<String>Human-readable title.
Author from source metadata.
created_at: i64Creation timestamp (Unix epoch seconds).
updated_at: i64Last modification timestamp (Unix epoch seconds).
content_type: StringMIME content type.
body: StringFull text body.
metadata_json: StringConnector-specific metadata as JSON.
raw_json: Option<String>Raw connector response.
dedup_hash: StringSHA-256 hash for deduplication: H(source || source_id || updated_at || body).