@vicinae/api
    Preparing search index...

    Function search

    • Search for files matching the provided query string.

      Parameters

      • query: string

        Search term (min. 1 character) - the shorter the query the longer the average search takes.

      • _: SearchOptions = {}

      Returns Promise<FileInfo[]>

      Promise resolving to array of matching files

      Uses prefix matching on filename tokens. For example:

      • File: "invoice-new-motherboard.pdf"
      • Matches: "inv", "new", "mother", "pdf"
      • No match: "board", "oice" (not prefixes)
      const files = await fileSearch.search('invoice');