KnowledgeIndex.fromSnapshot constructor
KnowledgeIndex.fromSnapshot({
- required KnowledgeSnapshot snapshot,
- required BaseStore store,
- required BaseEmbedder embedder,
- bool includeContext = false,
Opens the snapshot and store from the same completed index generation.
The caller verifies snapshot/configuration identity and owns the store and embedder. No synchronization, token fitting or document encoding occurs. Semantic search checks that every eligible passage has a compatible vector.
Implementation
KnowledgeIndex.fromSnapshot({
required KnowledgeSnapshot snapshot,
required this.store,
required this.embedder,
this.includeContext = false,
}) : countTokens = null,
maxTokens = null,
_snapshot = snapshot;