Skip to content

search-provider.ts#

View Markdown

Source

5 documented symbols. Read the signatures first, then expand each item for parameters, return types, and examples.

5 symbols 4 functions 1 modules 5 parameters 3 returns

Reference#

fngenerateHostedSearchModule(options: ResolvedSearchOptions): stringClient runtime that queries the hosted HTTP adapter. Misconfigured hosted searc…

Client runtime that queries the hosted HTTP adapter.

Misconfigured hosted search emits a no-op client so the UI never calls a broken endpoint.

Signature

export function generateHostedSearchModule(options: ResolvedSearchOptions): string

View source

Parameters

Returns

string
fnhasForbiddenSearchCredentialFields(options: object): booleanReturns true when the options object names a write or admin credential.

Returns true when the options object names a write or admin credential.

Signature

export function hasForbiddenSearchCredentialFields(options: object): boolean

View source

Parameters

  • options object

Returns

boolean
fnresolveHostedSearchConfig(options: SearchOptions, env: NodeJS.ProcessEnv = process.env): HostedSearchConfig | nullResolves hosted credentials from config or env. Missing or forbidden keys fail…

Resolves hosted credentials from config or env. Missing or forbidden keys fail closed and return null without echoing secrets.

Signature

export function resolveHostedSearchConfig(options: SearchOptions, env: NodeJS.ProcessEnv = process.env): HostedSearchConfig | null

View source

Parameters

  • options SearchOptions
  • env NodeJS.ProcessEnv

    optional · default: process.env

Returns

HostedSearchConfig | null
modulesearch-providerOpt-in hosted search provider for virtual:ox-content/search. Local BM25 stays the default. Hosted queries use a generic…

Opt-in hosted search provider for virtual:ox-content/search.

Local BM25 stays the default. Hosted queries use a generic HTTP adapter and a public search-only key. Write and admin keys are rejected.

View source

fntoLocalSearchRuntimeOptions(options: ResolvedSearchOptions)Runtime fields accepted by the native local BM25 module generator.

Runtime fields accepted by the native local BM25 module generator.

Signature

export function toLocalSearchRuntimeOptions(options: ResolvedSearchOptions)

View source

Parameters