Skip to main content

Interface: LibraryGroupHit

Defined in: packages/agentos/src/cognition/library/LibraryIndex.ts:240

One hit: an item by the passage that shows it.

Properties​

anyWord​

anyWord: boolean

Defined in: packages/agentos/src/cognition/library/LibraryIndex.ts:262

True for an item that holds some of the words and not all.


at​

at: number

Defined in: packages/agentos/src/cognition/library/LibraryIndex.ts:256

Where the first mark starts, or -1 with none.


date​

date: string | null

Defined in: packages/agentos/src/cognition/library/LibraryIndex.ts:260

The date the caller handed for the item.


field​

field: string

Defined in: packages/agentos/src/cognition/library/LibraryIndex.ts:250

The field of the match shown: the passage's, as the rank read it, or the title's when no passage holds a word.


marks​

marks: object[]

Defined in: packages/agentos/src/cognition/library/LibraryIndex.ts:254

Where the passage's text holds the words, in UTF-16 units, in order: the words of the word rule that match.

end​

end: number

start​

start: number


matchKind​

matchKind: "none" | "edit" | "start" | "same"

Defined in: packages/agentos/src/cognition/library/LibraryIndex.ts:252

How the first word the passage holds matched, or the first the item holds when the passage holds none; none in a listing.


partKind​

partKind: LibraryPartKind | null

Defined in: packages/agentos/src/cognition/library/LibraryIndex.ts:258

The passage's partKind, or null when it has none.


passage​

passage: LibraryPassage

Defined in: packages/agentos/src/cognition/library/LibraryIndex.ts:247

The item's passage that holds the most of the words, then the one of the strongest field, then the earliest; the item's first passage in a listing, or when only its title read from the metadata matched. Its score is the item's rank: for each word, the best of its matches over the item's passages, the field's weight times 1 for the same word, 0.75 for a word it begins and 0.5 for a word one edit away, summed over the words; 0 in a listing.


sourceId​

sourceId: string

Defined in: packages/agentos/src/cognition/library/LibraryIndex.ts:248