prorm API Reference
    Preparing search index...

    Class MeilisearchStore

    MeilisearchStore wraps the official meilisearch client and exposes index management, document CRUD, and search as a typed, promise-based API.

    Implements

    Index
    name: "meilisearch" = 'meilisearch'

    The name of the store (e.g. 'mongodb', 'redis', 'dynamodb')

    library: "meilisearch" = 'meilisearch'

    The client library being used

    • Create an index by uid, optionally specifying its primary key via options.

      Parameters

      • uid: string
      • Optionaloptions: Record<string, unknown>

      Returns Promise<any>

    • Add (or replace) documents in an index. Returns the enqueued task.

      Parameters

      • index: string
      • documents: Record<string, unknown>[]
      • Optionaloptions: Record<string, unknown>

      Returns Promise<any>

    • Run a search against an index and return the hits array from the response.

      Type Parameters

      • T = Record<string, unknown>

      Parameters

      • index: string
      • query: string
      • Optionaloptions: Record<string, unknown>

      Returns Promise<T[]>

    • Get a single document by its primary-key value.

      Type Parameters

      • T = Record<string, unknown>

      Parameters

      • index: string
      • id: string | number

      Returns Promise<T>

    • Delete a single document by its primary-key value. Returns the enqueued task.

      Parameters

      • index: string
      • id: string | number

      Returns Promise<any>

    • Get server-wide stats (database size, per-index document counts, etc.).

      Returns Promise<any>