goldenline/algolia-bundle

Integrates Algolia into Symfony

Installs: 64 373

Dependents: 1

Suggesters: 0

Security: 0

Stars: 2

Watchers: 16

Forks: 1

Open Issues: 0

Type:symfony-bundle

1.1.1 2022-06-13 04:47 UTC

This package is not auto-updated.

Last update: 2024-11-20 14:12:57 UTC


README

Dependency Status

Integrates Algolia into Symfony

Installation

The best way to install this bundle is by using Composer. Simply run:

$ php composer.phar require goldenline/algolia-bundle 1.0.0

Then, enable the bundle:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Goldenline\AlgoliaBundle\GoldenlineAlgoliaBundle(),
    );
}

Finally add your configuration:

# app/config/config.yml

goldenline_algolia:
    client:
        application_id: <your_application_id>
        application_key: <your_application_key>
    indices:
        foo:
            name: prefix_foo
        bar:
            name: bar

Currently we don`t support XML configuration.

Usage

Get your index from container i.e.:

  $this->getContainer()->get('goldenline_algolia.index.foo');

and use it according to https://github.com/algolia/algoliasearch-client-php#search documentation.

You can also use client service located in container: goldenline_algolia.client according to https://github.com/algolia/algoliasearch-client-php

License

This bundle is released under the MIT license. See the complete license in the bundle:

Resources/meta/LICENSE