> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Interface: VectorSearchQuery<TableInfo, IndexName>

> An object with parameters for performing a vector search against a vector index.

[server](/api/modules/server).VectorSearchQuery

An object with parameters for performing a vector search against a vector index.

## Type parameters

| Name | Type |
| :- | :- |
| `TableInfo` | extends [`GenericTableInfo`](/api/modules/server#generictableinfo) |
| `IndexName` | extends [`VectorIndexNames`](/api/modules/server#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.

***

### limit

• `Optional` **limit**: `number`

The number of results to return. If specified, must be between 1 and 256
inclusive.

**`Default`**

```ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
10
```

***

### filter

• `Optional` **filter**: (`q`: [`VectorFilterBuilder`](/api/interfaces/server.VectorFilterBuilder)\<[`DocumentByInfo`](/api/modules/server#documentbyinfo)\<`TableInfo`>, [`NamedVectorIndex`](/api/modules/server#namedvectorindex)\<`TableInfo`, `IndexName`>>) => [`FilterExpression`](/api/classes/server.FilterExpression)\<`boolean`>

#### Type declaration

▸ (`q`): [`FilterExpression`](/api/classes/server.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`](/api/interfaces/server.VectorFilterBuilder)\<[`DocumentByInfo`](/api/modules/server#documentbyinfo)\<`TableInfo`>, [`NamedVectorIndex`](/api/modules/server#namedvectorindex)\<`TableInfo`, `IndexName`>> |

##### Returns

[`FilterExpression`](/api/classes/server.FilterExpression)\<`boolean`>
