Skip to content

Installation

Clémentine Urquizar edited this page Jul 9, 2020 · 9 revisions

Require the dependency (with Composer)

First, install MeiliSearch Bundle Integration via the composer package manager:

$ composer require meilisearch/search-bundle

Register the bundle

The bundle is registered automatically. If it does not register, add the following entry to config/bundles.php.

return [
    Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
    // ... Other bundles ...
    MeiliSearch\Bundle\MeiliSearchBundle::class => ['all' => true],
];

MeiliSearch Configuration

You will also need to provide the MeiliSearch URL and Master key.

By default, they are loaded from environment variables MEILISEARCH_URL and MEILISEARCH_MASTER_KEY.

If you use .env config file, you can set them there.

MEILISEARCH_URL=http://127.0.0.1:7700
MEILISEARCH_MASTER_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

If you don't use environment variables, you can set them in your parameters.yml.

parameters:
    env(MEILISEARCH_URL): http://127.0.0.1:7700
    env(MEILISEARCH_MASTER_KEY): xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Clone this wiki locally