Skip to content

vexSearchQuery

Implementation signature for the two vexSearchQuery overloads above — not called directly with this shape. See the overloads for the public contract.

client

Any client exposing query(ref, args).

args

{ collection, searchIndexName, searchField, query, populate?, depth?, limit?, where?, drafts?, paginationOpts? }.

vexSearchQuery<TCollectionSlug, TPopulate, D>(client, args): Promise<DocReturnItem<TCollectionSlug, TPopulate, D>[]>

Defined in: packages/core/src/collections/api/networkQuery.ts:381

Searches documents in a collection by a search index via a direct network call.

TCollectionSlug extends string

TPopulate extends ContainerPopulateShape<PopulateMapFor<TCollectionSlug>> = Record<string, never>

D extends number = 0

VexNetworkQueryClient

Any client exposing query(ref, args).

SearchClientArgs<TCollectionSlug, TPopulate, D> & object

{ collection, searchIndexName, searchField, query, populate?, depth?, limit?, where?, drafts?, paginationOpts? }.

Promise<DocReturnItem<TCollectionSlug, TPopulate, D>[]>

The matching documents, or a PaginationResult when paginationOpts is given.

vexFindQuery for the client contract and why the funcRef cast is sound.

vexSearchQuery<TCollectionSlug, TPopulate, D>(client, args): Promise<SearchReturnPaginated<TCollectionSlug, TPopulate, D>>

Defined in: packages/core/src/collections/api/networkQuery.ts:389

Searches documents in a collection by a search index via a direct network call.

TCollectionSlug extends string

TPopulate extends ContainerPopulateShape<PopulateMapFor<TCollectionSlug>> = Record<string, never>

D extends number = 0

VexNetworkQueryClient

Any client exposing query(ref, args).

SearchClientPaginatedArgs<TCollectionSlug, TPopulate, D>

{ collection, searchIndexName, searchField, query, populate?, depth?, limit?, where?, drafts?, paginationOpts? }.

Promise<SearchReturnPaginated<TCollectionSlug, TPopulate, D>>

The matching documents, or a PaginationResult when paginationOpts is given.

vexFindQuery for the client contract and why the funcRef cast is sound.