-
Notifications
You must be signed in to change notification settings - Fork 31
Installation
Tomas Norkūnas edited this page Mar 6, 2024
·
9 revisions
First, install Meilisearch Bundle Integration via the composer
package manager:
$ composer require meilisearch/search-bundle symfony/http-client nyholm/psr7
You could use any PSR-18, compatible client with this SDK. No additional configurations are required.
A list of compatible HTTP clients and client adapters can be found at php-http.org.
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],
];
You will also need to provide the Meilisearch URL and Master key.
They are default 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_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
If you don't use environment variables, you can set them in your parameters.yml
or services.yml
.
parameters:
env(MEILISEARCH_URL): http://127.0.0.1:7700
env(MEILISEARCH_API_KEY): xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
More information about authentication.