AlgoliaBundle
, (*1)
Integrates Algolia into Symfony, (*2)
Installation
The best way to install this bundle is by using Composer. Simply run:, (*3)
``` bash
$ php composer.phar require goldenline/algolia-bundle 1.0.0, (*4)
Then, enable the bundle:
``` php
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Goldenline\AlgoliaBundle\GoldenlineAlgoliaBundle(),
);
}
Finally add your configuration:, (*5)
# 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., (*6)
Usage
Get your index from container i.e.:, (*7)
$this->getContainer()->get('goldenline_algolia.index.foo');
and use it according to https://github.com/algolia/algoliasearch-client-php#search documentation., (*8)
You can also use client service located in container: goldenline_algolia.client
according to https://github.com/algolia/algoliasearch-client-php, (*9)
License
This bundle is released under the MIT license. See the complete license in the
bundle:, (*10)
Resources/meta/LICENSE