Merge pull request #718 from WouterJ/patch-1
Applied standard installation template
This commit is contained in:
commit
d7e9d9b8a6
|
@ -1,40 +1,50 @@
|
||||||
Step 1: Setting up the bundle
|
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
|
```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
|
### Elasticsearch
|
||||||
|
|
||||||
Instructions for installing and deploying Elasticsearch may be found
|
Instructions for installing and deploying Elasticsearch may be found [here](http://www.elasticsearch.org/guide/reference/setup/installation/).
|
||||||
[here](http://www.elasticsearch.org/guide/reference/setup/installation/).
|
|
||||||
|
|
||||||
|
Step 2: Enable the Bundle
|
||||||
|
-------------------------
|
||||||
|
|
||||||
B) Enable FOSElasticaBundle
|
Then, enable the bundle by adding the following line in the `app/AppKernel.php`
|
||||||
---------------------------
|
file of your project:
|
||||||
|
|
||||||
Enable FOSElasticaBundle in your AppKernel:
|
|
||||||
|
|
||||||
```php
|
```php
|
||||||
<?php
|
<?php
|
||||||
// app/AppKernel.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
|
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
|
In this case, the service `fos_elastica.index.search` will be using an Elasticsearch
|
||||||
index of search_dev.
|
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.
|
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
|
There are a significant number of options available for types, that can be
|
||||||
[found here](types.md)
|
[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
|
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
|
The command will also create all indexes and types defined if they do not already exist
|
||||||
on the Elasticsearch server.
|
on the Elasticsearch server.
|
||||||
|
|
||||||
F) Usage
|
F: Usage
|
||||||
--------
|
--------
|
||||||
|
|
||||||
Usage documentation for the bundle is available [here](usage.md)
|
Usage documentation for the bundle is available [here](usage.md)
|
||||||
|
|
Loading…
Reference in a new issue