From 3af3188ad7b79f5beebc18a700a919e7e4091b7f Mon Sep 17 00:00:00 2001 From: James Brooks Date: Sat, 1 Mar 2014 16:54:02 +0000 Subject: [PATCH] [DOCS] Added some code formatting --- README.md | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 128d19e37..8de1c1461 100644 --- a/README.md +++ b/README.md @@ -38,32 +38,36 @@ The recommended method to install _Elasticsearch-PHP_ is through [Composer](http 1. Add ``elasticsearch/elasticsearch`` as a dependency in your project's ``composer.json`` file (change version to suit your version of Elasticsearch): -```json - { - "require": { - "elasticsearch/elasticsearch": "~1.0" + ```json + { + "require": { + "elasticsearch/elasticsearch": "~1.0" + } } - } -``` + ``` 2. Download and install Composer: + ```bash curl -s http://getcomposer.org/installer | php + ``` 3. Install your dependencies: + ```bash php composer.phar install --no-dev + ``` 4. Require Composer's autoloader Composer also prepares an autoload file that's capable of autoloading all of the classes in any of the libraries that it downloads. To use it, just add the following line to your code's bootstrap process: -```php - indices() and $client->cluster() objects, respectively. +You'll also notice that the client is configured in a manner that facilitates easy discovery via the IDE. All core actions are available under the `$client` object (indexing, searching, getting, etc). Index and cluster management are located under the `$client->indices()` and `$client->cluster()` objects, respectively. Check out the rest of the [Documentation](http://www.elasticsearch.org/guide/en/elasticsearch/client/php-api/current/index.html) to see how the entire client works.