Compare commits

...

21 commits

Author SHA1 Message Date
Simon Vieille 30e351b1d5 Propel provider: query_builder_method set to null 2015-05-20 11:13:43 +02:00
Simon Vieille e3abbdc700 Propel provider: default options 2015-05-20 11:12:03 +02:00
Tim Nagel 4451bd07c6 Merge pull request #860 from kayue/patch-1
Count the number of results for the query directly
2015-04-28 12:56:12 +10:00
Tim Nagel 1f8a330140 Merge pull request #870 from davidfuhr/patch-1
Fixed parameter name to kernel.environment
2015-04-28 12:55:14 +10:00
David Fuhr 8f7f24e6d3 Fixed parameter nam to kernel.environment
The parameter %kernel.env% does not exist. It throws the error message 'You have requested a non-existent parameter "kernel.env". Did you mean this: "kernel.environment"?'
2015-04-27 23:00:50 +02:00
Ka Yue Yeung e71ec4ac8a Count the number of results for the query directly 2015-04-18 00:42:02 +08:00
Lukas Kahwe Smith adf7fb21e3 Merge pull request #848 from thierrymarianne/patch-1
Fix typo
2015-04-05 23:20:26 +02:00
Thierry Marianne 1287d9f0df Fix typo 2015-04-05 22:07:41 +02:00
Tim Nagel c5728b5870 Merge branch '3.1.x' 2015-04-02 10:39:05 +11:00
Tim Nagel 7baf494c56 release 3.1.3 2015-04-02 10:34:08 +11:00
Tim Nagel ad20382e08 Merge pull request #842 from merk/fix-provider-symfony-23
Fix symfony 2.3 compatibility with 3.1
2015-04-02 10:33:05 +11:00
Tim Nagel e933a49d07 Use deprecated optionsResolver interface 2015-04-02 10:23:30 +11:00
Tim Nagel 35276f469a Merge pull request #835 from TomasVotruba/patch-2
Setup.md: fix link to Elasticsearch installation
2015-03-27 08:59:18 +11:00
Tim Nagel ec9f23bd8d Merge pull request #834 from TomasVotruba/patch-1
Setup.md - composer picks last stable version
2015-03-27 08:58:33 +11:00
Tomáš Votruba ae4cfd7e04 Setup.md: fix link to Elasticsearch installation 2015-03-26 15:05:28 +01:00
Tomáš Votruba 49a0c22724 Setup.md - composer picks last stable version 2015-03-26 15:03:20 +01:00
Tim Nagel a59f2015b4 Merge branch '3.1.x' 2015-03-18 09:40:06 +11:00
Christophe Coevoet 4081c32ca0 Merge branch '3.1.x' 2015-03-12 17:54:38 +01:00
Christophe Coevoet 133f71b88a Merge branch '3.1.x' 2015-03-12 17:49:49 +01:00
Tim Nagel 559b14b4a5 Merge branch '3.1.x' 2015-03-12 22:02:06 +11:00
Tim Nagel 81186e40db Bump master to 3.2-dev 2015-03-12 20:36:50 +11:00
7 changed files with 32 additions and 17 deletions

View file

@ -9,6 +9,10 @@ https://github.com/FriendsOfSymfony/FOSElasticaBundle/commit/XXX where XXX is
the commit hash. To get the diff between two versions, go to
https://github.com/FriendsOfSymfony/FOSElasticaBundle/compare/v3.0.4...v3.1.0
* 3.1.3 (2015-04-02)
* Fix Symfony 2.3 compatibility
* 3.1.2 (2015-03-27)
* Fix the previous release

View file

@ -80,7 +80,7 @@ class Provider extends AbstractProvider
}
/*
* An orderBy DQL part is required to avoid feching the same row twice.
* An orderBy DQL part is required to avoid fetching the same row twice.
* @see http://stackoverflow.com/questions/6314879/does-limit-offset-length-require-order-by-for-pagination
* @see http://www.postgresql.org/docs/current/static/queries-limit.html
* @see http://www.sqlite.org/lang_select.html#orderby

View file

@ -121,7 +121,7 @@ class RawPaginatorAdapter implements PaginatorAdapterInterface
public function getTotalHits($genuineTotal = false)
{
if (! isset($this->totalHits)) {
$this->totalHits = $this->searchable->search($this->query)->getTotalHits();
$this->totalHits = $this->searchable->count($this->query);
}
return $this->query->hasParam('size') && !$genuineTotal

View file

@ -40,6 +40,23 @@ class Provider extends AbstractProvider
}
}
/**
* {@inheritDoc}
*/
protected function configureOptions()
{
parent::configureOptions();
$this->resolver->setDefaults(array(
'clear_object_manager' => true,
'debug_logging' => false,
'ignore_errors' => false,
'offset' => 0,
'query_builder_method' => null,
'sleep' => 0
));
}
/**
* {@inheritDoc}
*/

View file

@ -108,7 +108,9 @@ abstract class AbstractProvider implements ProviderInterface
'batch_size' => 100,
'skip_indexable_check' => false,
));
$this->resolver->setAllowedTypes('batch_size', 'int');
$this->resolver->setAllowedTypes(array(
'batch_size' => 'int'
));
$this->resolver->setRequired(array(
'indexName',

View file

@ -8,7 +8,7 @@ Open a command console, enter your project directory and execute the
following command to download the latest stable version of this bundle:
```bash
$ composer require friendsofsymfony/elastica-bundle "~3.0"
$ composer require friendsofsymfony/elastica-bundle
```
This command requires you to have Composer installed globally, as explained
@ -17,7 +17,7 @@ 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](https://www.elastic.co/downloads/elasticsearch).
Step 2: Enable the Bundle
-------------------------
@ -74,7 +74,7 @@ Symfony application, use the example below:
fos_elastica:
indexes:
app:
index_name: app_%kernel.env%
index_name: app_%kernel.environment%
```
In this case, the service `fos_elastica.index.app` will relate to an ElasticSearch index

View file

@ -22,31 +22,23 @@
},
"require-dev":{
"doctrine/orm": "~2.4",
"doctrine/doctrine-bundle": "~1.2@beta",
"doctrine/doctrine-bundle": "~1.2",
"jms/serializer-bundle": "@stable",
"phpunit/phpunit": "~4.1",
"propel/propel1": "1.6.*",
"pagerfanta/pagerfanta": "1.0.*@dev",
"pagerfanta/pagerfanta": "~1.0",
"knplabs/knp-components": "~1.2",
"knplabs/knp-paginator-bundle": "~2.4",
"symfony/browser-kit" : "~2.3",
"symfony/expression-language" : "~2.4",
"symfony/twig-bundle": "~2.3"
},
"suggest": {
"doctrine/orm": "~2.4",
"doctrine/mongodb-odm": "1.0.*@dev",
"propel/propel1": "1.6.*",
"pagerfanta/pagerfanta": "1.0.*@dev",
"knplabs/knp-components": "~1.2",
"symfony/expression-language" : "~2.4"
},
"autoload": {
"psr-4": { "FOS\\ElasticaBundle\\": "" }
},
"extra": {
"branch-alias": {
"dev-master": "3.1.x-dev"
"dev-master": "3.2.x-dev"
}
}
}