Merge pull request #718 from WouterJ/patch-1

Applied standard installation template
This commit is contained in:
Tim Nagel 2015-01-12 10:48:42 +11:00
commit d7e9d9b8a6

View file

@ -1,40 +1,50 @@
Step 1: Setting up the bundle
=============================
A) Install FOSElasticaBundle
----------------------------
A: Download the Bundle
----------------------
FOSElasticaBundle is installed using [Composer](https://getcomposer.org).
Open a command console, enter your project directory and execute the
following command to download the latest stable version of this bundle:
```bash
$ php composer.phar require friendsofsymfony/elastica-bundle
$ composer require friendsofsymfony/elastica-bundle "~3.0"
```
This command requires you to have Composer installed globally, as explained
in the [installation chapter](https://getcomposer.org/doc/00-intro.md)
of the Composer documentation.
### Elasticsearch
Instructions for installing and deploying Elasticsearch may be found
[here](http://www.elasticsearch.org/guide/reference/setup/installation/).
Instructions for installing and deploying Elasticsearch may be found [here](http://www.elasticsearch.org/guide/reference/setup/installation/).
Step 2: Enable the Bundle
-------------------------
B) Enable FOSElasticaBundle
---------------------------
Enable FOSElasticaBundle in your AppKernel:
Then, enable the bundle by adding the following line in the `app/AppKernel.php`
file of your project:
```php
<?php
// app/AppKernel.php
public function registerBundles()
// ...
class AppKernel extends Kernel
{
$bundles = array(
public function registerBundles()
{
$bundles = array(
// ...
new FOS\ElasticaBundle\FOSElasticaBundle(),
);
// ...
new FOS\ElasticaBundle\FOSElasticaBundle(),
);
}
}
```
C) Basic Bundle Configuration
C: Basic Bundle Configuration
-----------------------------
The basic minimal configuration for FOSElasticaBundle is one client with one Elasticsearch
@ -68,7 +78,7 @@ fos_elastica:
In this case, the service `fos_elastica.index.search` will be using an Elasticsearch
index of search_dev.
D) Defining index types
D: Defining index types
-----------------------
By default, FOSElasticaBundle requires each type that is to be indexed to be mapped.
@ -122,7 +132,7 @@ Below is an example for the Doctrine ORM.
There are a significant number of options available for types, that can be
[found here](types.md)
E) Populating the Elasticsearch index
E: Populating the Elasticsearch index
-------------------------------------
When using the providers and listeners that come with the bundle, any new or modified
@ -137,7 +147,7 @@ $ php app/console fos:elastica:populate
The command will also create all indexes and types defined if they do not already exist
on the Elasticsearch server.
F) Usage
F: Usage
--------
Usage documentation for the bundle is available [here](usage.md)