Interface: LexicalGroupSearchOptions
Defined in: packages/agentos/src/core/vector-store/IVectorStore.ts:292
One group of a grouped lexical search (IVectorStore.lexicalGroupSearch): the items to read, the words, how an item ranks and which page of the answer is asked for.
Properties
after?
optionalafter:LexicalGroupKey
Defined in: packages/agentos/src/core/vector-store/IVectorStore.ts:334
The last item of the page before this one; without it, the first page.
expansion?
optionalexpansion:string[][]
Defined in: packages/agentos/src/core/vector-store/IVectorStore.ts:307
For each word, in order, the stored words one edit away that an earlier page of this search matched. With it the
store reads no stored word again and oneEdit is not read; a search hands back what the first page answered.
At most 64 a word; each stored word is at most 2046 bytes of UTF-8 and all of them, each with one byte more, at
most 1048575 bytes less the query's words, each counted twice with one byte more, as one tsquery holds them
beside those words.
filter?
optionalfilter:MetadataFilter
Defined in: packages/agentos/src/core/vector-store/IVectorStore.ts:340
What else a passage must meet: the caller's scope. A plain value, $eq, $ne, $in and $nin compare a key that
holds one value by its JSON type as well, so { tenantId: '7' } never admits a passage whose tenantId is the
number 7, as LibraryIndex checks the passages a store answers.
group
group:
object
Defined in: packages/agentos/src/core/vector-store/IVectorStore.ts:322
The items to read, which the search never leaves: a passage counts only when its sourceId is one of them, a
text and not a number of the same digits, and filter admits it. partKinds keeps the passages whose partKind metadata key is one of these; an empty list
narrows nothing. An item is listed once.
items
items:
LexicalGroupItem[]
partKinds?
optionalpartKinds:string[]
oneEdit?
optionaloneEdit:object
Defined in: packages/agentos/src/core/vector-store/IVectorStore.ts:316
Without expansion: widens each word of minLength letters or more to the stored words of the group's passages
that are one edit away (a letter added, dropped or changed, or two side by side swapped) and hold minLength
letters or more, the most frequent first, at most max a word, and only as many as expansion holds. max is a
whole number from 1 to 64. A word that more than max stored words are one edit from, or one whose stored word
expansion has no room for, marks the answer incomplete. The words drawn follow the rule the answer's
expansion states.
max
max:
number
minLength
minLength:
number
order
order:
"date"|"rank"
Defined in: packages/agentos/src/core/vector-store/IVectorStore.ts:330
rank: the highest rank first. date: the newest of the caller's dates first, an undated item after every dated one.
pageSize
pageSize:
number
Defined in: packages/agentos/src/core/vector-store/IVectorStore.ts:332
The most items a page answers: a whole number, 1 or more, that JavaScript holds exactly.
profile
profile:
object
Defined in: packages/agentos/src/core/vector-store/IVectorStore.ts:328
Each field's weight, a finite number above 0, read by a passage's field metadata key; a passage with no field,
or one fields does not name, takes the weight of fallback, which fields names. With title: 'metadata' an
item's title metadata key is matched as well, as the field title.
fallback
fallback:
string
fields
fields:
Record<string,number>
title?
optionaltitle:"metadata"|"passage"
signal?
optionalsignal:AbortSignal
Defined in: packages/agentos/src/core/vector-store/IVectorStore.ts:345
Checked between the store's statements: once it has aborted the store starts no further statement of the search
and answers incomplete with no item. A statement that has started runs to its end.
words
words:
string[]
Defined in: packages/agentos/src/core/vector-store/IVectorStore.ts:299
The query's words, in order, each once: a letter or a digit followed by letters, digits and combining marks, in
lower case, as lexicalTokens reads them. A word the store's text search configuration reads as no word (a stop
word) is left out of the search: the other words decide. With no word at all the search lists every item that holds
a passage, in the date order.