BmIndex class

In-memory BM25 index.

Constructors

BmIndex.fromBundle(McpBundle bundle, {BmConfig config = const BmConfig()})
Build a fresh index from bundle's KnowledgeSection.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
query(String text, {int topK = 5}) List<BmHit>
Run text against the index and return up to topK hits ordered by descending score.
rebuild(McpBundle bundle) → void
Discard the current corpus and rebuild from bundle. Cheap enough to run on every canonical change for project-sized corpora; a more granular incremental update is left for later rounds.
stats() Map<String, dynamic>
Index statistics — handy for the LiveQueryPreview footer.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited