fractal512/meilisan

Meilisearch methods wrapper for Laravel Artisan

v0.3 2024-02-27 10:41 UTC

This package is auto-updated.

Last update: 2024-04-27 10:58:53 UTC


README

This wrapper helps to manage Meilisearch functionality via console using Laravel Artisan.

Table of Contents

Installation

Install the package using composer:

composer require fractal512/meilisan

Usage

Use artisan meilisearch command to manage Meilisearch indexes, configuration, etc. The list of commands is being expanded...

Indexes

To manage indexes in the Meilisearch database use command:

php artisan meilisearch:index <action> [<index>] [options]

Arguments:

  • action - Action on index (get, set, delete)
  • index - Name of the index in the Meilisearch database

Options:

  • -o, --offset - Number of indexes to skip
  • -l, --limit - Number of indexes to return
  • -k, --key - Name of the primary key

Filterable Attributes

To manage filterable attributes for the Meilisearch index use command:

php artisan meilisearch:filterable <action> <index> [<attributes>]

Arguments:

  • action - action on filterable attributes (get, set, reset)
  • index - name of index in Meilisearch database
  • attributes - comma-separated list of filterable attributes to set

Ranking Rules

To manage ranking rules for the Meilisearch index use command:

php artisan meilisearch:ranking <action> <index> [<attributes>]

Arguments:

  • action - action on ranking rules (get, set, reset)
  • index - name of index in Meilisearch database
  • attributes - comma-separated list of ranking rules to set

Sortable Attributes

To manage sortable attributes for the Meilisearch index use command:

php artisan meilisearch:sortable <action> <index> [<attributes>]

Arguments:

  • action - action on sortable attributes (get, set, reset)
  • index - name of index in Meilisearch database
  • attributes - comma-separated list of sortable attributes to set

Stop Words

To manage stop words for the Meilisearch index use command:

php artisan meilisearch:stopwords <action> <index> [<stopwords>]

Arguments:

  • action - action on stop words (get, set, reset)
  • index - name of index in Meilisearch database
  • stopwords - comma-separated list of stop words to set