@dxos/app-toolkit - v0.16.0
    Preparing search index...

    Function byRelevance

    • Orders already-matched results for a query: exact label, then prefix, then substring, then shorter labels first. The index does the matching; this only orders what it returned.

      Parameters

      • query: string

      Returns (a: { label?: string }, b: { label?: string }) => number