Skip to main content

Interface: LexicalGroupSearchResult

Defined in: packages/agentos/src/core/vector-store/IVectorStore.ts:380

What a grouped lexical search answers for one group.

Properties​

anyWord​

anyWord: LexicalGroupRow[]

Defined in: packages/agentos/src/core/vector-store/IVectorStore.ts:412

On a first page of two words or more where no item matches every word: the items that match some of the words, in order, at most pageSize. They are outside total.


expansion​

expansion: string[][]

Defined in: packages/agentos/src/core/vector-store/IVectorStore.ts:405

For each word, in order, the stored words one edit away the search matched: found on a first page, the caller's own expansion echoed on a later page. LibraryIndex carries a first page's lists in its cursor and holds them to the same rule when a later page hands them back; a later page's cursor carries the lists the index handed that page, never the store's answer, so a store answers only lists that keep the rule:

  • a list for each word: on a first page, empty for a word under oneEdit.minLength letters, and empty for every word without oneEdit; on a later page, the list handed in expansion for that word;
  • each stored word one edit from its word (a letter added, dropped or changed, or two side by side swapped) and oneEdit.minLength letters or more, and never the word itself or a word that begins with it, which match as such;
  • each stored word once in its list, and at most oneEdit.max (64 at most) a word;
  • each at most 2046 bytes of UTF-8, and all of them within the room expansion states beside the query's words. A word the store left out for room or past max marks the answer incomplete. A first page's list outside the rule, such as [['budgets', 'budgte']] for budget, makes the index refuse the cursor of its own next page.

incomplete​

incomplete: boolean

Defined in: packages/agentos/src/core/vector-store/IVectorStore.ts:389

True when a word had more stored words one edit away than oneEdit.max, in which case the most frequent max are matched and the items are answered; when a stored word one edit away was left out as the tsquery had no room for it (past 2046 bytes, or past the room expansion states), in which case the words kept are matched and the items are answered; or when the signal stopped the search, in which case no item is.


more​

more: boolean

Defined in: packages/agentos/src/core/vector-store/IVectorStore.ts:414

Whether an item follows the page's last.


rows​

rows: LexicalGroupRow[]

Defined in: packages/agentos/src/core/vector-store/IVectorStore.ts:407

The page's items, in order.


total​

total: number

Defined in: packages/agentos/src/core/vector-store/IVectorStore.ts:382

How many distinct items match every word, whatever the page.