Preparing search index...

    Function buildPhraseIndex

    • Builds an index whose entries are matched as whole phrases. The caller is expected to feed full strings (e.g. an OCR'd line) to fuzzyHasMatch / fuzzySearchIds against this index.

      Tokens are lowercased; queries should be too (or use the same processTerm-equivalent upstream).

      Parameters

      • phrases: string[]
      • fuzzy: number

      Returns FuzzyIndex