Skip to content

Commit

Permalink
Merge branch '1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
saimaz committed Jun 28, 2016
2 parents d9b619c + 2e07496 commit ebba2b7
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
3 changes: 1 addition & 2 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ public function getConfigTreeBuilder()
->booleanNode('cache')
->info(
'Enables cache handler to store metadata and other data to the cache. '.
'Default is false, we recommend to enable it in the production.'
'By default it is enabled in prod environment and disabled in dev.'
)
->defaultFalse()
->end()
->append($this->getAnalysisNode())
->append($this->getConnectionsNode())
Expand Down
2 changes: 2 additions & 0 deletions DependencyInjection/ONGRElasticsearchExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public function load(array $configs, ContainerBuilder $container)

$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
$loader->load('services.yml');
$config['cache'] = isset($config['cache']) ?
$config['cache'] : !$container->getParameter('kernel.debug');

$container->setParameter('es.cache', $config['cache']);
$container->setParameter('es.analysis', $config['analysis']);
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Technical goodies:
* Registers console commands for index and types management and data import / export.
* Designed in an extensible way for all your custom needs.

If you have any questions, don't hesitate to ask them on [![Join the chat at https://gitter.im/ongr-io/support](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ongr-io/support)
chat, or just come to say Hi ;).
If you need any help, [stack overflow](http://stackoverflow.com/questions/tagged/ongr)
is the preffered and recommended way to ask ONGR support questions.


[![Build Status](https://travis-ci.org/ongr-io/ElasticsearchBundle.svg?branch=master)](https://travis-ci.org/ongr-io/ElasticsearchBundle)
Expand Down
8 changes: 8 additions & 0 deletions Resources/doc/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ Exports data from Elasticsearch index in a json format.

> Index export generates the same `JSON` format as specified in the import chapter.
## Generate document

Command name: `ongr:es:document:generate`

ONGR ElasticsearchBundle supports automatic document generation. This command will present a user with a set of questions and when those questions are
answered an ES document class is generated. This command does not require any options, all the information that is needed should be provided during the
execution of the command. The resulting documents are generated in the provided bundles `Documents` directory.

## Cache clear

Command name: `ongr:es:cache:clear`
Expand Down
4 changes: 2 additions & 2 deletions Service/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ public function remove($document)
*/
public function flush(array $params = [])
{
return $this->client->indices()->flush($params);
return $this->client->indices()->flush(array_merge(['index' => $this->getIndexName()], $params));
}

/**
Expand All @@ -309,7 +309,7 @@ public function flush(array $params = [])
*/
public function refresh(array $params = [])
{
return $this->client->indices()->refresh($params);
return $this->client->indices()->refresh(array_merge(['index' => $this->getIndexName()], $params));
}

/**
Expand Down

0 comments on commit ebba2b7

Please sign in to comment.