Skip to main content

Interface: LibraryGroupSearch

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

A grouped search: the words (none for a listing), who asks, the groups, the order, the typo rule and the page.

Properties​

cursor?​

optional cursor: string

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

A later page of one group: the cursor an earlier page of the same search answered for it. The answer then holds that group alone. A cursor made for another search throws a LibraryCursorError, and so does any value but a cursor's text: the null a group answers after its last page is not read as a first page.


expansionMax?​

optional expansionMax: number

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

The most stored words one edit away that a word is widened to, the most frequent kept: a whole number from 1 to 64; a search asking for more is refused before the store is asked anything, as one tsquery holding more than 64 a word for 32 words would pass what Postgres reads. A word with more marks its group incomplete, and so does a stored word the store's query has no room for beside the search's words (on PostgresVectorStore, one tsquery of a mebibyte).

Default​

64

groups​

groups: LibraryGroup[]

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

One group or more, each under an id of its own and searched on its own: its count, its page and its stored words are its items' alone.


order?​

optional order: "date" | "rank"

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

rank: the highest rank first. date: the newest of the caller's dates first, an undated item after every dated one in rank order. Level items stand in the order of their source ids. A listing with no word is in the date order under either.

Default​

'rank'

pageSize​

pageSize: number

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

The most hits a group answers on a page: a whole number, 1 or more, that JavaScript holds exactly.


profile​

profile: LibraryRankProfile

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


scope​

scope: LibraryScope

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


signal?​

optional signal: AbortSignal

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

Stops the search: checked before each group and between the store's statements. Once it has aborted, the store is asked nothing more, and the group being read and every group after it answer incomplete with no hit; a group with no item is complete either way. The search does not reject on it.


text​

text: string

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

The query. Its words are read by lexicalTokens, each once, the first 32; with no word, every item is listed.


typo?​

optional typo: "none" | "one-edit"

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

one-edit widens each word of four letters or more to the stored words of the group's own passages, of four letters or more, that are one edit away: a letter added, dropped or changed, or two side by side swapped.

Default​

'none'