MeiliSearchBundle is an opiniated Symfony bundle which configure and enable MeiliSearch.
The core logic act as a wrapper around the official MeiliSearch PHP SDK.
- DTO support (thanks to
Symfony/Serializer
) for documents - Mapping via YAML/XML/PHP/Annotation
- Document definition via Annotations or custom providers
Symfony/Messenger
integrationSymfony/HttpClient
supportSymfony/Cache
integration (fallback, search, CRUD)Symfony/ExpressionLanguage
support for building queries- Twig integration
- Custom form type
- Support for PHP 7.2 to 7.4 (8.0 not supported for now)
- Support for
Ramsey/uuid
Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.
composer require guikingone/meili-search-bundle
Once installed, time to update the config/bundles.php
:
// config/bundles.php
return [
// ...
MeiliSearchBundle\MeiliSearchBundle::class => ['all' => true],
];
Once done, just add a config/packages/meili_search.yaml
:
# config/packages/meili_search.yaml
meili_search:
host: '%env(MEILI_HOST)%' # Default to http://127.0.0.1
api_key: '%env(MEILI_API_KEY)%' # Optional but recommended in development mode
For a full breakdown of how to use this bundle, please refer to the documentation.
For a full breakdown of how to contribute to this bundle, please refer to CONTRIBUTING.md.