From 6336012becbd86f07bcb5d1289b04fdb184dae28 Mon Sep 17 00:00:00 2001 From: Ben Walch Date: Mon, 21 Mar 2022 17:59:13 +0100 Subject: [PATCH 1/2] correct field for term query (fixes #7) --- .../OutputChannel/Filter/AggregationFilter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DsElasticSearchBundle/OutputChannel/Filter/AggregationFilter.php b/src/DsElasticSearchBundle/OutputChannel/Filter/AggregationFilter.php index 8d33fce..f0c7ce6 100644 --- a/src/DsElasticSearchBundle/OutputChannel/Filter/AggregationFilter.php +++ b/src/DsElasticSearchBundle/OutputChannel/Filter/AggregationFilter.php @@ -136,7 +136,7 @@ protected function addQueryFilter(Search $query, array $queryFields): void $boolQuery = new BoolQuery(); foreach ($value as $relationValue) { - $relationQuery = new TermQuery($this->name, $relationValue); + $relationQuery = new TermQuery($this->options['field'], $relationValue); $boolQuery->add($relationQuery, $this->options['query_type']); } From 40e635d87f0728ff04fda7e142e13d1db3feabc0 Mon Sep 17 00:00:00 2001 From: Ben Walch Date: Tue, 22 Mar 2022 10:57:18 +0100 Subject: [PATCH 2/2] add upgrade note --- UPGRADE.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/UPGRADE.md b/UPGRADE.md index 323f814..724e162 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,5 +1,8 @@ # Upgrade Notes +### 2.0.1 +- [BUGFIX] Fix field for filter's term query [#7](https://github.com/dachcom-digital/pimcore-dynamic-search-index-provider-elasticsearch/issues/7) + ## Migrating from Version 1.x to Version 2.0.0 ### Global Changes