> ## 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: SearchPopulationQueryInitializer<TableInfo>

> Caller-visible rows.

[server](https://docs.bijection.com/api/modules/server).SearchPopulationQueryInitializer

Caller-visible rows. `withIndex` on an index declared
`authorization: "indexed"` enumerates readable rows directly in that index's
order; on any other index it reads the range and checks each row.

## Type parameters

| Name | Type |
| :- | :- |
| `TableInfo` | extends [`GenericTableInfo`](https://docs.bijection.com/api/modules/server#generictableinfo) |

## Hierarchy

* `Pick`\<[`PopulationQueryInitializer`](https://docs.bijection.com/api/interfaces/server.PopulationQueryInitializer)\<`TableInfo`>, `"withSearchIndex"` | `"vectorSearch"`>

  ↳ **`SearchPopulationQueryInitializer`**

## Methods

### withSearchIndex

▸ **withSearchIndex**\<`IndexName`>(`indexName`, `searchFilter`): [`SelectableOrderedQuery`](https://docs.bijection.com/api/interfaces/server.SelectableOrderedQuery)\<`TableInfo`>

#### Type parameters

| Name | Type |
| :- | :- |
| `IndexName` | extends [`SearchIndexNames`](https://docs.bijection.com/api/modules/server#searchindexnames)\<`TableInfo`> |

#### Parameters

| Name | Type |
| :- | :- |
| `indexName` | `IndexName` |
| `searchFilter` | (`q`: [`SearchFilterBuilder`](https://docs.bijection.com/api/interfaces/server.SearchFilterBuilder)\<[`DocumentByInfo`](https://docs.bijection.com/api/modules/server#documentbyinfo)\<`TableInfo`>, [`NamedSearchIndex`](https://docs.bijection.com/api/modules/server#namedsearchindex)\<`TableInfo`, `IndexName`>>) => [`SearchFilter`](https://docs.bijection.com/api/classes/server.SearchFilter) |

#### Returns

[`SelectableOrderedQuery`](https://docs.bijection.com/api/interfaces/server.SelectableOrderedQuery)\<`TableInfo`>

#### Inherited from

Pick.withSearchIndex

***

### vectorSearch

▸ **vectorSearch**\<`IndexName`>(`indexName`, `query`): `Promise`\<[`VectorSearchResult`](https://docs.bijection.com/api/modules/server#vectorsearchresult)\<[`DocumentByInfo`](https://docs.bijection.com/api/modules/server#documentbyinfo)\<`TableInfo`>\[`"_id"`]>>

Exact top-k over a stored view's complete current output, at this
function's snapshot. The caller must be able to read every output row,
markings included, or the search refuses before ranking. A table ranks
through `.visible().within(field, value).vectorSearch` instead.

#### Type parameters

| Name | Type |
| :- | :- |
| `IndexName` | extends [`VectorIndexNames`](https://docs.bijection.com/api/modules/server#vectorindexnames)\<`TableInfo`> |

#### Parameters

| Name | Type |
| :- | :- |
| `indexName` | `IndexName` |
| `query` | [`QueryVectorSearchQuery`](https://docs.bijection.com/api/modules/server#queryvectorsearchquery)\<`TableInfo`, `IndexName`> |

#### Returns

`Promise`\<[`VectorSearchResult`](https://docs.bijection.com/api/modules/server#vectorsearchresult)\<[`DocumentByInfo`](https://docs.bijection.com/api/modules/server#documentbyinfo)\<`TableInfo`>\[`"_id"`]>>

#### Inherited from

Pick.vectorSearch

***

### require

▸ **require**(`requirement`): [`SearchPopulationQueryInitializer`](https://docs.bijection.com/api/interfaces/server.SearchPopulationQueryInitializer)\<`TableInfo`>

#### Parameters

| Name | Type |
| :- | :- |
| `requirement` | [`SourceReadRequirement`](https://docs.bijection.com/api/modules/server#sourcereadrequirement) |

#### Returns

[`SearchPopulationQueryInitializer`](https://docs.bijection.com/api/interfaces/server.SearchPopulationQueryInitializer)\<`TableInfo`>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.