Interface: VectorSearchQuery<TableInfo, IndexName>
server.VectorSearchQuery
An object with parameters for performing a vector search against a vector index.
Type parameters
Name | Type |
---|---|
TableInfo | extends GenericTableInfo |
IndexName | extends VectorIndexNames <TableInfo > |
Properties
vector
• vector: number
[]
The query vector.
This must have the same length as the dimensions
of the index.
This vector search will return the IDs of the documents most similar to
this vector.
Defined in
limit
• Optional
limit: number
The number of results to return. If specified, must be between 1 and 256 inclusive.
Default
10
Defined in
filter
• Optional
filter: (q
: VectorFilterBuilder
<DocumentByInfo
<TableInfo
>, NamedVectorIndex
<TableInfo
, IndexName
>>) => FilterExpression
<boolean
>
Type declaration
▸ (q
): FilterExpression
<boolean
>
Optional filter expression made up of q.or
and q.eq
operating
over the filter fields of the index.
e.g. filter: q => q.or(q.eq("genre", "comedy"), q.eq("genre", "drama"))
Parameters
Name | Type |
---|---|
q | VectorFilterBuilder <DocumentByInfo <TableInfo >, NamedVectorIndex <TableInfo , IndexName >> |
Returns
FilterExpression
<boolean
>