Skip to content

scoreStaticIndex

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/apps/web/src/app/p/[slugId]/components/staticSearch.ts

Rank the static index for a query. Returns modal-ready results (highest first), dropping docs that match no query term. Pure + deterministic.

Signature

ts
function scoreStaticIndex(index: StaticSearchIndex, query: string, limit): StaticSearchResult[]

Parameters

NameType
indexStaticSearchIndex
querystring
limitany

Returns: StaticSearchResult[]

Was this page helpful?

Download as PDF