p23
This commit is contained in:
@@ -25,6 +25,7 @@ final readonly class RetriexEffectiveConfigProvider
|
||||
private SalesIntentConfig $salesIntentConfig,
|
||||
private ShopServiceConfig $shopServiceConfig,
|
||||
private StopWordsConfig $stopWordsConfig,
|
||||
private LanguageCleanupConfig $languageCleanupConfig,
|
||||
private QueryEnricherConfig $queryEnricherConfig,
|
||||
private GovernanceConfig $governanceConfig,
|
||||
private CatalogIntentConfig $catalogIntentConfig,
|
||||
@@ -607,6 +608,7 @@ final readonly class RetriexEffectiveConfigProvider
|
||||
private function commerceQueryConfig(): array
|
||||
{
|
||||
return [
|
||||
'cleanup_profile' => $this->commerceQueryParserConfig->getCleanupProfile(),
|
||||
'known_brands' => $this->commerceQueryParserConfig->getKnownBrands(),
|
||||
'phrases_to_remove' => $this->commerceQueryParserConfig->getPhrasesToRemove(),
|
||||
'filter_search_tokens' => $this->commerceQueryParserConfig->getFilterSearchTokens(),
|
||||
@@ -1212,6 +1214,13 @@ final readonly class RetriexEffectiveConfigProvider
|
||||
$this->validateCommerceQueryPatterns($patterns, $errors, $warnings);
|
||||
}
|
||||
|
||||
$cleanupProfile = $commerceQuery['cleanup_profile'] ?? null;
|
||||
if (!is_string($cleanupProfile) || trim($cleanupProfile) === '') {
|
||||
$errors[] = 'commerce_query.cleanup_profile must be a non-empty string.';
|
||||
} elseif (!in_array($cleanupProfile, $this->languageCleanupConfig->getCleanupProfileNames(), true)) {
|
||||
$errors[] = 'commerce_query.cleanup_profile references unknown language cleanup profile: ' . $cleanupProfile . '.';
|
||||
}
|
||||
|
||||
$measurementPattern = $patterns['measurement_value_token'] ?? null;
|
||||
$filterTokens = $commerceQuery['filter_search_tokens'] ?? [];
|
||||
foreach ($this->governanceConfig->getRegressionProtectedMeasurementValues() as $measurementValue) {
|
||||
|
||||
Reference in New Issue
Block a user