Hit class

Constructors

Hit({String? doctype, String? name, String? project, String? provider, num? score, String? title, String? url})
Returns a new Hit instance.

Properties

doctype ↔ 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.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
name ↔ 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.
getter/setter pair
project ↔ 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.
getter/setter pair
provider ↔ 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.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
score ↔ num?
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.
getter/setter pair
title ↔ 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).
getter/setter pair
url ↔ 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.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

fromJson(dynamic value) → Hit?
Returns a new Hit instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<Hit>
mapFromJson(dynamic json) → Map<String, Hit>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<Hit>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.