guikingone/meili-search-bundle

A Symfony bundle that enable MeiliSearch

0.1.0 2020-11-02 17:34 UTC

This package is auto-updated.

Last update: 2024-10-23 21:52:56 UTC


README

MeiliSearchBundle CI SymfonyInsight

MeiliSearchBundle is an opiniated Symfony bundle which configure and enable MeiliSearch.

The core logic act as a wrapper around the official MeiliSearch PHP SDK.

Main features

  • DTO support (thanks to Symfony/Serializer) for documents
  • Mapping via YAML/XML/PHP/Annotation
  • Document definition via Annotations or custom providers
  • Symfony/Messenger integration
  • Symfony/HttpClient support
  • Symfony/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

Installation

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

Usage

For a full breakdown of how to use this bundle, please refer to the documentation.

Contributing

For a full breakdown of how to contribute to this bundle, please refer to CONTRIBUTING.md.