Compare commits
21 commits
Author | SHA1 | Date | |
---|---|---|---|
Simon Vieille | 30e351b1d5 | ||
Simon Vieille | e3abbdc700 | ||
4451bd07c6 | |||
1f8a330140 | |||
8f7f24e6d3 | |||
e71ec4ac8a | |||
adf7fb21e3 | |||
1287d9f0df | |||
c5728b5870 | |||
7baf494c56 | |||
ad20382e08 | |||
e933a49d07 | |||
35276f469a | |||
ec9f23bd8d | |||
ae4cfd7e04 | |||
49a0c22724 | |||
a59f2015b4 | |||
4081c32ca0 | |||
133f71b88a | |||
559b14b4a5 | |||
81186e40db |
|
@ -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
|
the commit hash. To get the diff between two versions, go to
|
||||||
https://github.com/FriendsOfSymfony/FOSElasticaBundle/compare/v3.0.4...v3.1.0
|
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)
|
* 3.1.2 (2015-03-27)
|
||||||
|
|
||||||
* Fix the previous release
|
* Fix the previous release
|
||||||
|
|
|
@ -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://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.postgresql.org/docs/current/static/queries-limit.html
|
||||||
* @see http://www.sqlite.org/lang_select.html#orderby
|
* @see http://www.sqlite.org/lang_select.html#orderby
|
||||||
|
|
|
@ -121,7 +121,7 @@ class RawPaginatorAdapter implements PaginatorAdapterInterface
|
||||||
public function getTotalHits($genuineTotal = false)
|
public function getTotalHits($genuineTotal = false)
|
||||||
{
|
{
|
||||||
if (! isset($this->totalHits)) {
|
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
|
return $this->query->hasParam('size') && !$genuineTotal
|
||||||
|
|
|
@ -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}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -108,7 +108,9 @@ abstract class AbstractProvider implements ProviderInterface
|
||||||
'batch_size' => 100,
|
'batch_size' => 100,
|
||||||
'skip_indexable_check' => false,
|
'skip_indexable_check' => false,
|
||||||
));
|
));
|
||||||
$this->resolver->setAllowedTypes('batch_size', 'int');
|
$this->resolver->setAllowedTypes(array(
|
||||||
|
'batch_size' => 'int'
|
||||||
|
));
|
||||||
|
|
||||||
$this->resolver->setRequired(array(
|
$this->resolver->setRequired(array(
|
||||||
'indexName',
|
'indexName',
|
||||||
|
|
|
@ -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:
|
following command to download the latest stable version of this bundle:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ composer require friendsofsymfony/elastica-bundle "~3.0"
|
$ composer require friendsofsymfony/elastica-bundle
|
||||||
```
|
```
|
||||||
|
|
||||||
This command requires you to have Composer installed globally, as explained
|
This command requires you to have Composer installed globally, as explained
|
||||||
|
@ -17,7 +17,7 @@ of the Composer documentation.
|
||||||
|
|
||||||
### Elasticsearch
|
### 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
|
Step 2: Enable the Bundle
|
||||||
-------------------------
|
-------------------------
|
||||||
|
@ -74,7 +74,7 @@ Symfony application, use the example below:
|
||||||
fos_elastica:
|
fos_elastica:
|
||||||
indexes:
|
indexes:
|
||||||
app:
|
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
|
In this case, the service `fos_elastica.index.app` will relate to an ElasticSearch index
|
||||||
|
|
|
@ -22,31 +22,23 @@
|
||||||
},
|
},
|
||||||
"require-dev":{
|
"require-dev":{
|
||||||
"doctrine/orm": "~2.4",
|
"doctrine/orm": "~2.4",
|
||||||
"doctrine/doctrine-bundle": "~1.2@beta",
|
"doctrine/doctrine-bundle": "~1.2",
|
||||||
"jms/serializer-bundle": "@stable",
|
"jms/serializer-bundle": "@stable",
|
||||||
"phpunit/phpunit": "~4.1",
|
"phpunit/phpunit": "~4.1",
|
||||||
"propel/propel1": "1.6.*",
|
"propel/propel1": "1.6.*",
|
||||||
"pagerfanta/pagerfanta": "1.0.*@dev",
|
"pagerfanta/pagerfanta": "~1.0",
|
||||||
"knplabs/knp-components": "~1.2",
|
"knplabs/knp-components": "~1.2",
|
||||||
"knplabs/knp-paginator-bundle": "~2.4",
|
"knplabs/knp-paginator-bundle": "~2.4",
|
||||||
"symfony/browser-kit" : "~2.3",
|
"symfony/browser-kit" : "~2.3",
|
||||||
"symfony/expression-language" : "~2.4",
|
"symfony/expression-language" : "~2.4",
|
||||||
"symfony/twig-bundle": "~2.3"
|
"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": {
|
"autoload": {
|
||||||
"psr-4": { "FOS\\ElasticaBundle\\": "" }
|
"psr-4": { "FOS\\ElasticaBundle\\": "" }
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "3.1.x-dev"
|
"dev-master": "3.2.x-dev"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue