• A simple brute-force search across a collection of local documents. For more complex or large scale search consider using:

    Parameters

    • query: Uint8Array

      A vector that represents a query

    • docs: Uint8Array<ArrayBufferLike>[]

      An array of vectors that represents the documents to be searched

    • topN: number = 10

      The number of top results to be returned

    • scorer: SimilarityScorer = computeHammingSimilarity

      The SimilarityScorer to be used

    Returns Match[]

    the top scoring matches