move intent an config value into config files
This commit is contained in:
@@ -25,7 +25,6 @@ final class ShopServiceConfig
|
||||
'monitor',
|
||||
'monitore',
|
||||
'controller',
|
||||
'controller',
|
||||
'gerät für',
|
||||
'geraet fuer',
|
||||
'geräte für',
|
||||
@@ -131,4 +130,328 @@ final class ShopServiceConfig
|
||||
'geräte',
|
||||
'geraete',
|
||||
];
|
||||
|
||||
public function getTopProductLogLimit(): int
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getDeviceFocusKeywords(): array
|
||||
{
|
||||
return [
|
||||
'geräte',
|
||||
'geraete',
|
||||
'gerät',
|
||||
'geraet',
|
||||
'analysegerät',
|
||||
'analysegeraet',
|
||||
'messgerät',
|
||||
'messgeraet',
|
||||
'analysator',
|
||||
'controller',
|
||||
'monitor',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getAccessoryFocusKeywords(): array
|
||||
{
|
||||
return [
|
||||
'indikator',
|
||||
'indikatoren',
|
||||
'reagenz',
|
||||
'reagenzien',
|
||||
'zubehör',
|
||||
'zubehor',
|
||||
'ersatzteil',
|
||||
'ersatzteile',
|
||||
'verbrauchsmaterial',
|
||||
'service set',
|
||||
'serviceset',
|
||||
'filter',
|
||||
'pumpenkopf',
|
||||
'motorblock',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, string[]>
|
||||
*/
|
||||
public function getAccessoryFocusVariantMap(): array
|
||||
{
|
||||
return [
|
||||
'indikator' => ['indikator', 'indikatoren'],
|
||||
'indikatoren' => ['indikator', 'indikatoren'],
|
||||
'reagenz' => ['reagenz', 'reagenzien'],
|
||||
'reagenzien' => ['reagenz', 'reagenzien'],
|
||||
'ersatzteil' => ['ersatzteil', 'ersatzteile'],
|
||||
'ersatzteile' => ['ersatzteil', 'ersatzteile'],
|
||||
'service set' => ['service set', 'serviceset', 'service-set'],
|
||||
'serviceset' => ['service set', 'serviceset', 'service-set'],
|
||||
'service-set' => ['service set', 'serviceset', 'service-set'],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getDeviceQueryKeywords(): array
|
||||
{
|
||||
return self::DEVICE_QUERY_KEYWORDS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getAccessoryQueryKeywords(): array
|
||||
{
|
||||
return self::ACCESSORY_QUERY_KEYWORDS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getAccessoryProductKeywords(): array
|
||||
{
|
||||
return self::ACCESSORY_PRODUCT_KEYWORDS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getDeviceProductKeywords(): array
|
||||
{
|
||||
return self::DEVICE_PRODUCT_KEYWORDS;
|
||||
}
|
||||
|
||||
public function getExactProductNumberPhraseScore(): int
|
||||
{
|
||||
return 160;
|
||||
}
|
||||
|
||||
public function getExactProductNamePhraseScore(): int
|
||||
{
|
||||
return 90;
|
||||
}
|
||||
|
||||
public function getExactManufacturerMatchScore(): int
|
||||
{
|
||||
return 40;
|
||||
}
|
||||
|
||||
public function getBrandContainedInNameScore(): int
|
||||
{
|
||||
return 20;
|
||||
}
|
||||
|
||||
public function getNameTokenOverlapWeight(): int
|
||||
{
|
||||
return 6;
|
||||
}
|
||||
|
||||
public function getProductNumberTokenOverlapWeight(): int
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
|
||||
public function getCorpusTokenOverlapWeight(): int
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
public function getNameNumberOverlapWeight(): int
|
||||
{
|
||||
return 18;
|
||||
}
|
||||
|
||||
public function getProductNumberNumberOverlapWeight(): int
|
||||
{
|
||||
return 28;
|
||||
}
|
||||
|
||||
public function getCorpusNumberOverlapWeight(): int
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
public function getSizeMatchScore(): int
|
||||
{
|
||||
return 12;
|
||||
}
|
||||
|
||||
public function getAvailabilityBonusScore(): int
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
public function getDeviceQueryDeviceProductBonus(): int
|
||||
{
|
||||
return 60;
|
||||
}
|
||||
|
||||
public function getDeviceQueryAccessoryPenalty(): int
|
||||
{
|
||||
return 120;
|
||||
}
|
||||
|
||||
public function getAccessoryQueryAccessoryProductBonus(): int
|
||||
{
|
||||
return 30;
|
||||
}
|
||||
|
||||
public function getAccessoryQueryDeviceProductBonus(): int
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
|
||||
public function getContainsDigitPattern(): string
|
||||
{
|
||||
return '/\d/u';
|
||||
}
|
||||
|
||||
public function getMatchingCleanupPattern(): string
|
||||
{
|
||||
return '/[^\p{L}\p{N}]+/u';
|
||||
}
|
||||
|
||||
public function getWhitespaceCollapsePattern(): string
|
||||
{
|
||||
return '/\s+/u';
|
||||
}
|
||||
|
||||
public function getTokenSplitPattern(): string
|
||||
{
|
||||
return '/[^\p{L}\p{N}]+/u';
|
||||
}
|
||||
|
||||
public function wrapWithPaddingSpaces(string $value): string
|
||||
{
|
||||
return ' ' . trim($value) . ' ';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getPriceNormalizationSearch(): array
|
||||
{
|
||||
return ['€', ' ', '.'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getPriceNormalizationReplace(): array
|
||||
{
|
||||
return ['', '', ''];
|
||||
}
|
||||
|
||||
public function getPrimaryCustomFieldKey(): string
|
||||
{
|
||||
return 'migration_Backup_product_attr1';
|
||||
}
|
||||
|
||||
public function getSecondaryCustomFieldKey(): string
|
||||
{
|
||||
return 'migration_Backup_product_attr2';
|
||||
}
|
||||
|
||||
public function getUseCasesCustomFieldKey(): string
|
||||
{
|
||||
return 'migration_Backup_product_attr4';
|
||||
}
|
||||
|
||||
public function getLanguagesCustomFieldKey(): string
|
||||
{
|
||||
return 'migration_Backup_product_attr5';
|
||||
}
|
||||
|
||||
public function getPrimarySecondarySeparator(): string
|
||||
{
|
||||
return ': ';
|
||||
}
|
||||
|
||||
public function getUseCasesLabel(): string
|
||||
{
|
||||
return 'Einsatzgebiete: ';
|
||||
}
|
||||
|
||||
public function getLanguagesLabel(): string
|
||||
{
|
||||
return 'Sprachen: ';
|
||||
}
|
||||
|
||||
public function getCustomFieldJoinSeparator(): string
|
||||
{
|
||||
return ' | ';
|
||||
}
|
||||
|
||||
public function getDescriptionEmptyLinePattern(): string
|
||||
{
|
||||
return '/^[ \t]*\R/m';
|
||||
}
|
||||
|
||||
public function getDescriptionWhitespaceCleanupPattern(): string
|
||||
{
|
||||
return '/[ \t]{2,}/';
|
||||
}
|
||||
|
||||
public function getDescriptionMaxLength(): int
|
||||
{
|
||||
return 1500;
|
||||
}
|
||||
|
||||
public function getPriceDecimals(): int
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
public function getPriceDecimalSeparator(): string
|
||||
{
|
||||
return ',';
|
||||
}
|
||||
|
||||
public function getPriceThousandsSeparator(): string
|
||||
{
|
||||
return '.';
|
||||
}
|
||||
|
||||
public function getPriceSuffix(): string
|
||||
{
|
||||
return ' €';
|
||||
}
|
||||
|
||||
public function buildRelativeSeoUrl(string $path): string
|
||||
{
|
||||
return '/' . ltrim($path, '/');
|
||||
}
|
||||
|
||||
public function getAvailableHighlightLabel(): string
|
||||
{
|
||||
return 'Verfügbar';
|
||||
}
|
||||
|
||||
public function getUnavailableHighlightLabel(): string
|
||||
{
|
||||
return 'Nicht verfügbar';
|
||||
}
|
||||
|
||||
public function getProductNumberHighlightPrefix(): string
|
||||
{
|
||||
return 'Produktnummer: ';
|
||||
}
|
||||
|
||||
public function getMissingProductImagePlaceholder(): string
|
||||
{
|
||||
return 'no-image';
|
||||
}
|
||||
|
||||
public function getDeduplicationSeparator(): string
|
||||
{
|
||||
return '|';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user