Skip to content

Commit 3a7da7a

Browse files
author
Simonas Šerlinskas
committed
support for esb 0.10.2
1 parent 56340e2 commit 3a7da7a

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

DependencyInjection/Configuration.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,12 @@ private function buildFilterTree($filterName)
147147
->arrayNode('sort')
148148
->children()
149149
->enumNode('type')
150-
->values([TermsAggregation::MODE_TERM, TermsAggregation::MODE_COUNT])
151-
->defaultValue(TermsAggregation::MODE_TERM)
150+
->values(['_term', '_count'])
151+
->defaultValue('_term')
152152
->end()
153153
->enumNode('order')
154-
->values([TermsAggregation::DIRECTION_ASC, TermsAggregation::DIRECTION_DESC])
155-
->defaultValue(TermsAggregation::DIRECTION_ASC)
154+
->values(['asc', 'desc'])
155+
->defaultValue('asc')
156156
->end()
157157
->arrayNode('priorities')->prototype('scalar')->end()
158158
->end()

Filters/Widget/Choice/SingleTermChoice.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ public function preProcessSearch(Search $search, Search $relatedSearch, FilterSt
7575
$aggregation->setField($this->getField());
7676

7777
if ($this->getSortType()) {
78-
$aggregation->setOrder($this->getSortType()['type'], $this->getSortType()['order']);
78+
$aggregation->addParameter('order', [$this->getSortType()['type'] => $this->getSortType()['order']]);
7979
}
8080

81-
$aggregation->setSize(0);
81+
$aggregation->addParameter('size', 0);
8282
if ($this->getSize() > 0) {
83-
$aggregation->setSize($this->getSize());
83+
$aggregation->addParameter('size', $this->getSize());
8484
}
8585

8686
if ($relatedSearch->getPostFilters()) {

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"require": {
1414
"php": ">=5.4",
1515
"symfony/symfony": "~2.6",
16-
"ongr/elasticsearch-bundle": "~0.9"
16+
"ongr/elasticsearch-bundle": "~0.10.2"
1717
},
1818
"require-dev": {
1919
"phpunit/phpunit": "~4.1",

0 commit comments

Comments
 (0)