@@ -206,7 +206,7 @@ public function cleanIndex($storeId, $mappedIndexerId)
206
206
// prepare new index name and increase version
207
207
$ indexPattern = $ this ->indexNameResolver ->getIndexPattern ($ storeId , $ mappedIndexerId );
208
208
$ version = (int )(str_replace ($ indexPattern , '' , $ indexName ));
209
- $ newIndexName = $ indexPattern . ++$ version ;
209
+ $ newIndexName = $ indexPattern . ( ++$ version) ;
210
210
211
211
// remove index if already exists
212
212
if ($ this ->client ->indexExists ($ newIndexName )) {
@@ -357,12 +357,14 @@ protected function prepareIndex($storeId, $indexName, $mappedIndexerId)
357
357
{
358
358
$ this ->indexBuilder ->setStoreId ($ storeId );
359
359
$ settings = $ this ->indexBuilder ->build ();
360
- $ allAttributeTypes = $ this ->fieldMapper ->getAllAttributesTypes ([
361
- 'entityType ' => $ mappedIndexerId ,
362
- // Use store id instead of website id from context for save existing fields mapping.
363
- // In future websiteId will be eliminated due to index stored per store
364
- 'websiteId ' => $ storeId
365
- ]);
360
+ $ allAttributeTypes = $ this ->fieldMapper ->getAllAttributesTypes (
361
+ [
362
+ 'entityType ' => $ mappedIndexerId ,
363
+ // Use store id instead of website id from context for save existing fields mapping.
364
+ // In future websiteId will be eliminated due to index stored per store
365
+ 'websiteId ' => $ storeId
366
+ ]
367
+ );
366
368
$ settings ['index ' ]['mapping ' ]['total_fields ' ]['limit ' ] = $ this ->getMappingTotalFieldsLimit ($ allAttributeTypes );
367
369
$ this ->client ->createIndex ($ indexName , ['settings ' => $ settings ]);
368
370
$ this ->client ->addFieldsMapping (
0 commit comments