TextChunk class
One chunk of source text. Carries enough metadata to cite back to the original document (source path + ordinal within that document) plus arbitrary meta for higher-level info (page number, heading path, etc.).
Chunks are produced by a Chunker; an Embedder turns the text of
each chunk into a vector; a CorpusStore persists the pair.
- Annotations
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
meta
→ Map<
String, Object?> -
Free-form per-chunk metadata. Stored as JSON in the SQLite row.
Keep values JSON-encodable (no DateTime, no custom types).
final
- ord → int
-
Index of this chunk within its source document, starting at 0.
Adjacent ordinals share
overlapcharacters when produced by a sliding-window chunker.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sourcePath → String
-
Origin file (or logical identifier) for citations. Free-form; the
store uses it verbatim.
final
- text → String
-
The chunk's text payload — what gets embedded and shown back to the
model at retrieval time.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited