Skip to content

Commit 4678629

Browse files
committed
NEXT-12169 - Increase ES version for CI
1 parent 857448d commit 4678629

File tree

9 files changed

+20
-21
lines changed

9 files changed

+20
-21
lines changed

.github/workflows/jest.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
MYSQL_ROOT_PASSWORD: shopware
2121
MYSQL_DATABASE: shopware
2222
elasticsearch:
23-
image: elastic/elasticsearch:7.1.1
23+
image: elastic/elasticsearch:7.3.0
2424
env:
2525
discovery.type: single-node
2626

@@ -67,7 +67,7 @@ jobs:
6767
MYSQL_ROOT_PASSWORD: shopware
6868
MYSQL_DATABASE: shopware
6969
elasticsearch:
70-
image: elastic/elasticsearch:7.1.1
70+
image: elastic/elasticsearch:7.3.0
7171
env:
7272
discovery.type: single-node
7373

.github/workflows/php-check.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
MYSQL_ROOT_PASSWORD: shopware
2121
MYSQL_DATABASE: shopware
2222
elasticsearch:
23-
image: elastic/elasticsearch:7.1.1
23+
image: elastic/elasticsearch:7.3.0
2424
env:
2525
discovery.type: single-node
2626

.github/workflows/phpunit.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
MYSQL_ROOT_PASSWORD: shopware
2222
MYSQL_DATABASE: shopware
2323
elasticsearch:
24-
image: elastic/elasticsearch:7.1.1
24+
image: elastic/elasticsearch:7.3.0
2525
env:
2626
discovery.type: single-node
2727

.github/workflows/validate-snippets.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
MYSQL_ROOT_PASSWORD: shopware
2525
MYSQL_DATABASE: shopware
2626
elasticsearch:
27-
image: elastic/elasticsearch:7.1.1
27+
image: elastic/elasticsearch:7.3.0
2828
env:
2929
discovery.type: single-node
3030

.gitlab-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ PHP Unit:
9393
- name: $MYSQL_IMAGE
9494
alias: mysql
9595
entrypoint: [ "sh", "-c", "docker-entrypoint.sh $MYSQL_CMD" ]
96-
- name: elastic/elasticsearch:7.1.1
96+
- name: elastic/elasticsearch:7.3.0
9797
alias: elasticsearch
9898
command: [ "bin/elasticsearch", "-Expack.security.enabled=false", "-Ediscovery.type=single-node" ]
9999
rules:

src/Docs/Resources/current/50-how-to/500-using-elasticsearch.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[titleEn]: <>(Using elasticsearch)
22
[hash]: <>(article:how_to_elasticsearch)
33

4-
As soon as several thousand data sets are used in a project it makes sense to deal with Elasticsearch. Elasticsearch 7.1 or newer is required.
4+
As soon as several thousand data sets are used in a project it makes sense to deal with Elasticsearch. Elasticsearch 7.3 or newer is required.
55
The Elasticsearch integration for shopware is in the `shopware/elasticsearch` bundle. If this is not available in your project you can simply add it via `composer require shopware/elasticsearch`.
66

77
To activate Elasticsearch the following environment variables have to be set:

src/Docs/Resources/deprecated/4-how-to/500-using-elasticsearch.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[titleEn]: <>(Using elasticsearch)
22
[hash]: <>(article:how_to_elasticsearch)
33

4-
As soon as several thousand data sets are used in a project it makes sense to deal with Elasticsearch. Elasticsearch 7.1 or newer is required.
4+
As soon as several thousand data sets are used in a project it makes sense to deal with Elasticsearch. Elasticsearch 7.3 or newer is required.
55
The Elasticsearch integration for shopware is in the `shopware/elasticsearch` bundle. If this is not available in your project you can simply add it via `composer require shopware/elasticsearch`.
66

77
To activate Elasticsearch the following environment variables have to be set:

src/Elasticsearch/Framework/Indexing/ElasticsearchIndexer.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use Shopware\Core\Framework\DataAbstractionLayer\EntityDefinition;
1515
use Shopware\Core\Framework\DataAbstractionLayer\EntityRepositoryInterface;
1616
use Shopware\Core\Framework\DataAbstractionLayer\Event\EntityWrittenContainerEvent;
17-
use Shopware\Core\Framework\DataAbstractionLayer\FieldSerializer\JsonFieldSerializer;
1817
use Shopware\Core\Framework\DataAbstractionLayer\Indexing\EntityIndexer as AbstractEntityIndexer;
1918
use Shopware\Core\Framework\DataAbstractionLayer\Indexing\EntityIndexingMessage;
2019
use Shopware\Core\Framework\DataAbstractionLayer\Search\Criteria;
@@ -285,7 +284,7 @@ public function handle(EntityIndexingMessage $message): void
285284
$result = $this->client->bulk([
286285
'index' => $index,
287286
'type' => $definition->getEntityDefinition()->getEntityName(),
288-
'body' => JsonFieldSerializer::encodeJson($documents),
287+
'body' => $documents,
289288
]);
290289

291290
$this->cacheClearer->invalidateTags([$entity . '.id']);

src/Elasticsearch/Product/ElasticsearchProductDefinition.php

+11-11
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ public function getMapping(Context $context): array
6969
'configuratorSettings' => $this->mapper->mapField($definition, $definition->getField('configuratorSettings'), $context),
7070
]
7171
),
72-
// 'dynamic_templates' => [
73-
// [
74-
// 'cheapest_price' => [
75-
// 'match_pattern' => 'regex',
76-
// 'match' => '^cheapest_price_rule',
77-
// 'mapping' => ['type' => 'double'],
78-
// ],
79-
// ],
80-
// ],
72+
'dynamic_templates' => [
73+
[
74+
'cheapest_price' => [
75+
'match_pattern' => 'regex',
76+
'match' => '^cheapest_price_rule',
77+
'mapping' => ['type' => 'double'],
78+
],
79+
],
80+
],
8181
];
8282
}
8383

@@ -164,10 +164,10 @@ private function mapCheapestPrices(EntityCollection $collection, array $document
164164
foreach ($price as $rule => $currencies) {
165165
foreach ($currencies as $currency => $taxes) {
166166
$key = 'cheapest_price_' . $rule . '_' . $currency . '_gross';
167-
$document[$key] = (float) $taxes['gross'];
167+
$document[$key] = $taxes['gross'];
168168

169169
$key = 'cheapest_price_' . $rule . '_' . $currency . '_net';
170-
$document[$key] = (float) $taxes['net'];
170+
$document[$key] = $taxes['net'];
171171
}
172172
}
173173
}

0 commit comments

Comments
 (0)