From 70135fc1f1007ba7f3ddd43459bf342a6ea6eab0 Mon Sep 17 00:00:00 2001 From: Romain Ruaud Date: Tue, 10 Dec 2024 17:25:31 +0100 Subject: [PATCH] Adding fine-tuning options for the autocompletion --- .../Autocomplete/Category/DataProvider.php | 27 +--- .../Product/Collection/Filter.php | 42 +------ .../etc/adminhtml/system.xml | 1 + .../etc/config.xml | 5 + .../Helper/Autocomplete.php | 49 ++++++++ .../Autocomplete/SuggestedTermsProvider.php | 115 ++++++++++++++++++ .../Model/Search/QueryStringProvider.php | 70 +++++++++++ .../etc/adminhtml/system.xml | 34 ++++++ src/module-elasticsuite-core/i18n/de_DE.csv | 9 ++ src/module-elasticsuite-core/i18n/en_US.csv | 9 ++ src/module-elasticsuite-core/i18n/fr_FR.csv | 9 ++ src/module-elasticsuite-core/i18n/nl_NL.csv | 9 ++ 12 files changed, 319 insertions(+), 60 deletions(-) create mode 100644 src/module-elasticsuite-core/Model/Autocomplete/SuggestedTermsProvider.php create mode 100644 src/module-elasticsuite-core/Model/Search/QueryStringProvider.php diff --git a/src/module-elasticsuite-catalog/Model/Autocomplete/Category/DataProvider.php b/src/module-elasticsuite-catalog/Model/Autocomplete/Category/DataProvider.php index 9d6bb4580..b8689df36 100644 --- a/src/module-elasticsuite-catalog/Model/Autocomplete/Category/DataProvider.php +++ b/src/module-elasticsuite-catalog/Model/Autocomplete/Category/DataProvider.php @@ -18,7 +18,7 @@ use Magento\Search\Model\QueryFactory; use Smile\ElasticsuiteCatalog\Helper\Autocomplete as ConfigurationHelper; use Smile\ElasticsuiteCatalog\Model\ResourceModel\Category\Fulltext\CollectionFactory as CategoryCollectionFactory; -use Smile\ElasticsuiteCore\Model\Autocomplete\Terms\DataProvider as TermDataProvider; +use Smile\ElasticsuiteCore\Model\Autocomplete\SuggestedTermsProvider; /** * Catalog category autocomplete data provider. @@ -49,7 +49,7 @@ class DataProvider implements DataProviderInterface protected $queryFactory; /** - * @var TermDataProvider + * @var SuggestedTermsProvider */ protected $termDataProvider; @@ -73,7 +73,7 @@ class DataProvider implements DataProviderInterface * * @param ItemFactory $itemFactory Suggest item factory. * @param QueryFactory $queryFactory Search query factory. - * @param TermDataProvider $termDataProvider Search terms suggester. + * @param SuggestedTermsProvider $termDataProvider Search terms suggester. * @param CategoryCollectionFactory $categoryCollectionFactory Category collection factory. * @param ConfigurationHelper $configurationHelper Autocomplete configuration helper. * @param string $type Autocomplete provider type. @@ -81,7 +81,7 @@ class DataProvider implements DataProviderInterface public function __construct( ItemFactory $itemFactory, QueryFactory $queryFactory, - TermDataProvider $termDataProvider, + SuggestedTermsProvider $termDataProvider, CategoryCollectionFactory $categoryCollectionFactory, ConfigurationHelper $configurationHelper, $type = self::AUTOCOMPLETE_TYPE @@ -143,23 +143,6 @@ private function isCategoryAvailable(Category $category): bool ; } - /** - * List of search terms suggested by the search terms data provider. - * - * @return array - */ - private function getSuggestedTerms() - { - $terms = array_map( - function (\Magento\Search\Model\Autocomplete\Item $termItem) { - return $termItem->getTitle(); - }, - $this->termDataProvider->getItems() - ); - - return $terms; - } - /** * Suggested categories collection. * Returns null if no suggested search terms. @@ -171,7 +154,7 @@ private function getCategoryCollection() { $categoryCollection = null; - $suggestedTerms = $this->getSuggestedTerms(); + $suggestedTerms = $this->termDataProvider->getSuggestedTerms(); $terms = [$this->queryFactory->get()->getQueryText()]; if (!empty($suggestedTerms)) { diff --git a/src/module-elasticsuite-catalog/Model/Autocomplete/Product/Collection/Filter.php b/src/module-elasticsuite-catalog/Model/Autocomplete/Product/Collection/Filter.php index b2ad5e9c1..02c18d840 100644 --- a/src/module-elasticsuite-catalog/Model/Autocomplete/Product/Collection/Filter.php +++ b/src/module-elasticsuite-catalog/Model/Autocomplete/Product/Collection/Filter.php @@ -13,10 +13,8 @@ */ namespace Smile\ElasticsuiteCatalog\Model\Autocomplete\Product\Collection; -use Magento\Search\Model\QueryFactory; -use Smile\ElasticsuiteCore\Model\Autocomplete\Terms\DataProvider as TermDataProvider; -use Magento\Search\Model\Autocomplete\Item as TermItem; use Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection as ProductCollection; +use Smile\ElasticsuiteCore\Model\Autocomplete\SuggestedTermsProvider; /** * Catalog autocomplete product collection filter. @@ -27,13 +25,6 @@ */ class Filter implements PreProcessorInterface { - /** - * Query factory - * - * @var QueryFactory - */ - private $queryFactory; - /** * @var TermDataProvider */ @@ -42,12 +33,10 @@ class Filter implements PreProcessorInterface /** * Constructor. * - * @param QueryFactory $queryFactory Search term query factory. - * @param TermDataProvider $termDataProvider Popular search terms provider. + * @param SuggestedTermsProvider $termDataProvider Suggested search terms provider. */ - public function __construct(QueryFactory $queryFactory, TermDataProvider $termDataProvider) + public function __construct(SuggestedTermsProvider $termDataProvider) { - $this->queryFactory = $queryFactory; $this->termDataProvider = $termDataProvider; } @@ -61,31 +50,8 @@ public function __construct(QueryFactory $queryFactory, TermDataProvider $termDa */ public function prepareCollection(ProductCollection $collection) { - $terms = $this->getQueryText(); - - $collection->setSearchQuery($terms); + $collection->setSearchQuery($this->termDataProvider->getSuggestedTerms()); return $collection; } - - /** - * List of search terms suggested by the search terms data provider. - * - * @return array - */ - private function getQueryText() - { - $terms = array_map( - function (TermItem $termItem) { - return $termItem->getTitle(); - }, - $this->termDataProvider->getItems() - ); - - if (empty($terms)) { - $terms = [$this->queryFactory->get()->getQueryText()]; - } - - return $terms; - } } diff --git a/src/module-elasticsuite-catalog/etc/adminhtml/system.xml b/src/module-elasticsuite-catalog/etc/adminhtml/system.xml index bacdef06d..1ad6b96da 100644 --- a/src/module-elasticsuite-catalog/etc/adminhtml/system.xml +++ b/src/module-elasticsuite-catalog/etc/adminhtml/system.xml @@ -41,6 +41,7 @@ +
diff --git a/src/module-elasticsuite-catalog/etc/config.xml b/src/module-elasticsuite-catalog/etc/config.xml index f53713d97..dfd18e7db 100644 --- a/src/module-elasticsuite-catalog/etc/config.xml +++ b/src/module-elasticsuite-catalog/etc/config.xml @@ -33,6 +33,11 @@ 3 + + 1 + 0 + 0 + diff --git a/src/module-elasticsuite-core/Helper/Autocomplete.php b/src/module-elasticsuite-core/Helper/Autocomplete.php index 34f3f0123..3e607f74b 100644 --- a/src/module-elasticsuite-core/Helper/Autocomplete.php +++ b/src/module-elasticsuite-core/Helper/Autocomplete.php @@ -51,6 +51,55 @@ public function isEnabled($type) return $this->getMaxSize($type) > 0; } + /** + * Check if Autocomplete "extension" system is enabled. + * + * @return bool + */ + public function isExtensionEnabled() + { + return (bool) $this->scopeConfig->isSetFlag( + self::AUTOCOMPLETE_SETTINGS_CONFIG_XML_PREFIX . "/advanced/extension_enabled", + \Magento\Store\Model\ScopeInterface::SCOPE_STORE + ); + } + + /** + * Check if Autocomplete "extension" system is limited. + * + * @return bool + */ + public function isExtensionLimited() + { + return (bool) $this->scopeConfig->isSetFlag( + self::AUTOCOMPLETE_SETTINGS_CONFIG_XML_PREFIX . "/advanced/extension_limit", + \Magento\Store\Model\ScopeInterface::SCOPE_STORE + ); + } + + /** + * Get the maximum number of popular search terms to use when the "extension" is limited. + * + * @return int + */ + public function getExtensionSize() + { + return (int) $this->getConfigValue("advanced/extension_size"); + } + + /** + * Check if Autocomplete "extension" system is stopped when having matches. + * + * @return bool + */ + public function isExtensionStoppedOnMatch() + { + return (bool) $this->scopeConfig->isSetFlag( + self::AUTOCOMPLETE_SETTINGS_CONFIG_XML_PREFIX . "/advanced/stop_extension_on_match", + \Magento\Store\Model\ScopeInterface::SCOPE_STORE + ); + } + /** * Retrieve a configuration value by its key * diff --git a/src/module-elasticsuite-core/Model/Autocomplete/SuggestedTermsProvider.php b/src/module-elasticsuite-core/Model/Autocomplete/SuggestedTermsProvider.php new file mode 100644 index 000000000..5f11b0a1a --- /dev/null +++ b/src/module-elasticsuite-core/Model/Autocomplete/SuggestedTermsProvider.php @@ -0,0 +1,115 @@ + + * @copyright 2024 Smile + * @license Open Software License ("OSL") v. 3.0 + */ + +namespace Smile\ElasticsuiteCore\Model\Autocomplete; + +use Magento\Search\Model\Autocomplete\Item as TermItem; +use Smile\ElasticsuiteCore\Helper\Autocomplete; +use Smile\ElasticsuiteCore\Model\Autocomplete\Terms\DataProvider as TermDataProvider; +use Smile\ElasticsuiteCore\Model\Search\QueryStringProviderFactory; + +/** + * Suggested Terms Provider. + * Based on the Term provider but will manipulate it according to configuration. + * + * @category Smile + * @package Smile\ElasticsuiteCatalog + * @author Romain Ruaud + */ +class SuggestedTermsProvider +{ + /** + * @var \Smile\ElasticsuiteCore\Model\Autocomplete\Terms\DataProvider + */ + private $termDataProvider; + + /** + * @var \Smile\ElasticsuiteCatalog\Helper\Autocomplete + */ + private $helper; + + /** + * @var \Smile\ElasticsuiteCore\Model\Search\QueryStringProviderFactory + */ + private $queryStringProviderFactory; + + /** + * @var null + */ + private $terms = null; + + /** + * @param Autocomplete $helper Autocomplete helper + * @param TermDataProvider $termDataProvider Term data provider + * @param QueryStringProviderFactory $queryStringProviderFactory Search Query Factory + */ + public function __construct( + Autocomplete $helper, + TermDataProvider $termDataProvider, + QueryStringProviderFactory $queryStringProviderFactory + ) { + $this->helper = $helper; + $this->termDataProvider = $termDataProvider; + $this->queryStringProviderFactory = $queryStringProviderFactory; + } + + /** + * List of search terms suggested by the search terms data provider, and reworked according to configuration. + * + * @return array|string[] + */ + public function getSuggestedTerms() + { + if (null === $this->terms) { + $terms = []; + + if ($this->helper->isExtensionEnabled()) { + $terms = array_map( + function (TermItem $termItem) { + return trim($termItem->getTitle()); + }, + $this->termDataProvider->getItems() + ); + + $hasAlreadyStoppedExtending = false; + if ($this->helper->isExtensionStoppedOnMatch()) { + if (array_search(trim($this->getQueryStringProvider()->get()), $terms) !== false) { + $terms = [$this->getQueryStringProvider()->get()]; + $hasAlreadyStoppedExtending = true; + } + } + + if ($this->helper->isExtensionLimited() && !$hasAlreadyStoppedExtending) { + $terms = array_slice($terms, 0, (int) $this->helper->getExtensionSize()); + } + } + + if (empty($terms)) { + $terms = [$this->getQueryStringProvider()->get()]; + } + + $this->terms = array_unique($terms); + } + + return $this->terms; + } + + /** + * @return \Smile\ElasticsuiteCore\Model\Search\QueryStringProvider + */ + private function getQueryStringProvider() + { + return $this->queryStringProviderFactory->create(); + } +} diff --git a/src/module-elasticsuite-core/Model/Search/QueryStringProvider.php b/src/module-elasticsuite-core/Model/Search/QueryStringProvider.php new file mode 100644 index 000000000..e3ac30a29 --- /dev/null +++ b/src/module-elasticsuite-core/Model/Search/QueryStringProvider.php @@ -0,0 +1,70 @@ + + * @copyright 2024 Smile + * @license Open Software License ("OSL") v. 3.0 + */ + +namespace Smile\ElasticsuiteCore\Model\Search; + +use Magento\Framework\Stdlib\StringUtils; +use Magento\Framework\App\RequestInterface; +use Magento\Search\Model\QueryFactory; + +/** + * Query String provider : will fetch current search query from current request. + * + * @category Smile + * @package Smile\ElasticsuiteCore + * @author Romain Ruaud + */ +class QueryStringProvider +{ + /** + * @var RequestInterface + */ + private $request; + + /** @var StringUtils */ + private $string; + + /** + * @var null|string + */ + private $currentQuery = null; + + /** + * QueryStringProvider constructor. + * + * @param RequestInterface $request HTTP Request + * @param StringUtils $string String utils + */ + public function __construct(RequestInterface $request, StringUtils $string) + { + $this->request = $request; + $this->string = $string; + } + + /** + * Get current query string. + * + * @return string + */ + public function get() + { + if ($this->currentQuery === null) { + $queryText = $this->request->getParam(QueryFactory::QUERY_VAR_NAME); + + $this->currentQuery = ($queryText === null || is_array($queryText)) ? '' : $this->string->cleanString(trim($queryText)); + } + + return $this->currentQuery; + } +} diff --git a/src/module-elasticsuite-core/etc/adminhtml/system.xml b/src/module-elasticsuite-core/etc/adminhtml/system.xml index 9b0d4b8b7..71df55e22 100644 --- a/src/module-elasticsuite-core/etc/adminhtml/system.xml +++ b/src/module-elasticsuite-core/etc/adminhtml/system.xml @@ -180,6 +180,40 @@ + + + + + + Magento\Config\Model\Config\Source\Yesno + + + + + Magento\Config\Model\Config\Source\Yesno + + 1 + + + + + + integer + + 1 + 1 + + + + + + Magento\Config\Model\Config\Source\Yesno + + 1 + + + +
diff --git a/src/module-elasticsuite-core/i18n/de_DE.csv b/src/module-elasticsuite-core/i18n/de_DE.csv index 68a6015c1..6cfa479f3 100644 --- a/src/module-elasticsuite-core/i18n/de_DE.csv +++ b/src/module-elasticsuite-core/i18n/de_DE.csv @@ -120,3 +120,12 @@ "If enabled, when indexing a reference like ""DC3000"", it will be as if ""DC3"" was indexed instead (leading to independant elements ""DC"", ""3"" and ""DC3"" in the search index). This will allow someone searching for ""dc3"" or ""dc 3"" to find the product with the exact ""DC3000"" sku.","Wenn aktiviert, wenn eine Referenz wie ""DC3000"" indiziert wird wird es sein, als ob ""DC3"" stattdessen indiziert wurde (was zu unabhängigen Elementen ""DC"", ""3"" und ""DC3"" im Suchindex). Dadurch kann jemand, der nach ""dc3"" oder ""dc 3"" sucht, das Produkt mit dem genauen ""DC3000"" sku finden." "Reduce series of contiguous zeroes in numeric parts","Reduziert die Serie der angrenzenden Nullen in numerischen Teilen" "If enabled, when indexing a reference like ""PL20004"", it will be as if ""PL204"" was indexed instead (leading to independant elements ""PL"", ""204"" and ""PL204"" in the search index). This will allow someone searching for ""pl204"", ""pl 204"", ""pl2004"" or ""pl 2004"" to find the product with the exact ""PL2004"" sku.","Wenn aktiviert, wenn eine Referenz wie ""PL20004"" indiziert wird wird es sein, als ob ""PL204"" stattdessen indiziert wurde (was zu unabhängigen Elementen ""PL"", ""204"" und ""PL204"" im Suchindex führt). Dadurch kann jemand, der nach ""pl204"", ""pl 204"", ""pl2004"" oder ""pl 2004"" sucht, das Produkt mit dem genauen ""PL2004"" sku finden." +"Advanced Settings","Erweiterte Einstellungen" +"Use suggested search terms to fetch results","Verwenden Sie vorgeschlagene Suchbegriffe, um Ergebnisse abzurufen" +"Default: Yes. When enabled, autocompletion box results will be computed from the current search term the user is typing, but also with the suggested search terms. This is intended to suggest results when the user is in the process of typing. Eg : When the user is typing ""comp"", the popular search term ""computer"" will be suggested, and therefore products or categories matching ""computer"" will be shown.","Standard: Ja. Wenn aktiviert, werden die Ergebnisse der Autovervollständigungsbox basierend auf dem aktuellen Suchbegriff des Benutzers berechnet, aber auch mit den vorgeschlagenen Suchbegriffen. Dies soll Ergebnisse vorschlagen, während der Benutzer tippt. Beispiel: Wenn der Benutzer ""comp"" eingibt, wird der beliebte Suchbegriff ""computer"" vorgeschlagen, und Produkte oder Kategorien, die zu ""computer"" passen, werden angezeigt." +"Limit the amount of suggested search terms used for autocomplete matching","Begrenzen Sie die Anzahl der vorgeschlagenen Suchbegriffe für die Autovervollständigung" +"Default: No. When set to ""No"", this setting will use the maximum number of suggested popular search terms configured in the dedicated section.","Standard: Nein. Wenn auf ""Nein"" gesetzt, verwendet diese Einstellung die maximale Anzahl an vorgeschlagenen beliebten Suchbegriffen, die im entsprechenden Abschnitt konfiguriert sind." +"The number of suggested popular search terms to use for fetching results.","Die Anzahl der vorgeschlagenen beliebten Suchbegriffe, die für das Abrufen von Ergebnissen verwendet werden sollen." +"The number of suggested search terms that will be used for fetching results in the autocompletion box.","Die Anzahl der vorgeschlagenen Suchbegriffe, die in der Autovervollständigungsbox verwendet werden sollen, um Ergebnisse abzurufen." +"Stop the extension mechanism when the current search term of the user is suggested.","Stoppen Sie den Erweiterungsmechanismus, wenn der aktuelle Suchbegriff des Benutzers vorgeschlagen wird." +"Default: No. When set to ""Yes"", this setting will discard the extension mechanism as soon as the exact search term entered by the user is part of the suggestions. Eg : When the user has finished to type ""computer"", if the list of suggested search terms is ""computer"", ""apple computer"", ""computer for kids"", only ""computer"" will be considered as it's exactly what the user has written.","Standard: Nein. Wenn auf ""Ja"" gesetzt, wird dieser Mechanismus deaktiviert, sobald der genaue Suchbegriff, den der Benutzer eingegeben hat, Teil der Vorschläge ist. Beispiel: Wenn der Benutzer ""computer"" fertig eingegeben hat und die Liste der vorgeschlagenen Suchbegriffe ""computer"", ""apple computer"", ""computer für Kinder"" enthält, wird nur ""computer"" berücksichtigt, da es genau das ist, was der Benutzer eingegeben hat." diff --git a/src/module-elasticsuite-core/i18n/en_US.csv b/src/module-elasticsuite-core/i18n/en_US.csv index 3b249391f..d84d3b9b8 100644 --- a/src/module-elasticsuite-core/i18n/en_US.csv +++ b/src/module-elasticsuite-core/i18n/en_US.csv @@ -130,3 +130,12 @@ Autocomplete,Autocomplete "Please select a stemmer for the store","Please select a stemmer for the store" "Time for an index to be considered Ghost (in seconds)","Time for an index to be considered Ghost (in seconds)" "Elasticsuite derelict indices resulting from a failed full reindex are considered ghost after this amount of time (in seconds) has elapsed since their creation. You can reduce this amount of time to speed up ghost indices cleanup, but take care to add a safety on top of the maximum reindexing duration of the more complex index of your platform (usually a catalog_product/product search index). Defaults to 172,800 seconds (2 days), minimum value: 3600 (1 hour).","Elasticsuite derelict indices resulting from a failed full reindex are considered ghost after this amount of time (in seconds) has elapsed since their creation. You can reduce this amount of time to speed up ghost indices cleanup, but take care to add a safety on top of the maximum reindexing duration of the more complex index of your platform (usually a catalog_product/product search index). Defaults to 172,800 seconds (2 days), minimum value: 3600 (1 hour)." +"Advanced Settings","Advanced Settings" +"Use suggested search terms to fetch results","Use suggested search terms to fetch results" +"Default: Yes. When enabled, autocompletion box results will be computed from the current search term the user is typing, but also with the suggested search terms. This is intended to suggest results when the user is in the process of typing. Eg : When the user is typing ""comp"", the popular search term ""computer"" will be suggested, and therefore products or categories matching ""computer"" will be shown.","Default: Yes. When enabled, autocompletion box results will be computed from the current search term the user is typing, but also with the suggested search terms. This is intended to suggest results when the user is in the process of typing. Eg : When the user is typing ""comp"", the popular search term ""computer"" will be suggested, and therefore products or categories matching ""computer"" will be shown." +"Limit the amount of suggested search terms used for autocomplete matching","Limit the amount of suggested search terms used for autocomplete matching" +"Default: No. When set to ""No"", this setting will use the maximum number of suggested popular search terms configured in the dedicated section.","Default: No. When set to ""No"", this setting will use the maximum number of suggested popular search terms configured in the dedicated section." +"The number of suggested popular search terms to use for fetching results.","The number of suggested popular search terms to use for fetching results." +"The number of suggested search terms that will be used for fetching results in the autocompletion box.","The number of suggested search terms that will be used for fetching results in the autocompletion box." +"Stop the extension mechanism when the current search term of the user is suggested.","Stop the extension mechanism when the current search term of the user is suggested." +"Default: No. When set to ""Yes"", this setting will discard the extension mechanism as soon as the exact search term entered by the user is part of the suggestions. Eg : When the user has finished to type ""computer"", if the list of suggested search terms is ""computer"", ""apple computer"", ""computer for kids"", only ""computer"" will be considered as it's exactly what the user has written.","Default: No. When set to ""Yes"", this setting will discard the extension mechanism as soon as the exact search term entered by the user is part of the suggestions. Eg : When the user has finished to type ""computer"", if the list of suggested search terms is ""computer"", ""apple computer"", ""computer for kids"", only ""computer"" will be considered as it's exactly what the user has written." diff --git a/src/module-elasticsuite-core/i18n/fr_FR.csv b/src/module-elasticsuite-core/i18n/fr_FR.csv index d5dde3dae..b88037a7e 100644 --- a/src/module-elasticsuite-core/i18n/fr_FR.csv +++ b/src/module-elasticsuite-core/i18n/fr_FR.csv @@ -130,3 +130,12 @@ General,Général "Please select a stemmer for the store","Veuillez sélectionner un stemmer pour le magasin" "Time for an index to be considered Ghost (in seconds)","Temps avant qu'un index soit considéré Fantôme (en secondes)" "Elasticsuite derelict indices resulting from a failed full reindex are considered ghost after this amount of time (in seconds) has elapsed since their creation. You can reduce this amount of time to speed up ghost indices cleanup, but take care to add a safety on top of the maximum reindexing duration of the more complex index of your platform (usually a catalog_product/product search index). Defaults to 172,800 seconds (2 days), minimum value: 3600 (1 hour).","Les index Elasticsuite résultant de l'échec d'une ré-indexation complète sont considérés comme fantômes après que cette période de temps (en secondes) s'est écoulée depuis leur création. Vous pouvez réduire cette période de temps pour accélérer la suppression des index fantômes, mais prenez soin d'ajouter une période de sécurité au temps de réindexation maximum de l'index le plus complexe de votre plateforme (généralement un index catalog_product/de recherche produits). Valeur par défaut: 172 800 secondes (2 jours), valeur minimum: 3600 (1 heure)." +"Advanced Settings","Paramètres avancés" +"Use suggested search terms to fetch results","Utiliser les termes de recherche suggérés pour étendre des résultats" +"Default: Yes. When enabled, autocompletion box results will be computed from the current search term the user is typing, but also with the suggested search terms. This is intended to suggest results when the user is in the process of typing. Eg : When the user is typing ""comp"", the popular search term ""computer"" will be suggested, and therefore products or categories matching ""computer"" will be shown.","Par défaut : Oui. Lorsqu'activé, les résultats affichés dans l'autocomplétion seront calculés à partir du terme de recherche actuel que l'utilisateur est en train de taper, mais aussi avec les termes de recherche suggérés. Cela vise à suggérer des résultats pendant la saisie de l'utilisateur. Exemple : lorsque l'utilisateur tape ""ord"", le terme de recherche populaire ""ordinateur"" sera suggéré, et donc les produits ou catégories correspondant à ""ordinateur"" seront affichés." +"Limit the amount of suggested search terms used for autocomplete matching","Limiter le nombre de termes de recherche suggérés utilisés pour étendre l'autocomplétion" +"Default: No. When set to ""No"", this setting will use the maximum number of suggested popular search terms configured in the dedicated section.","Par défaut : Non. Lorsque cette option est définie sur ""Non"", ce paramètre utilisera le nombre maximum de termes de recherche populaires suggérés configurés dans la section dédiée." +"The number of suggested popular search terms to use for fetching results.","Le nombre de termes de recherche populaires suggérés à utiliser pour obtenir des résultats." +"The number of suggested search terms that will be used for fetching results in the autocompletion box.","Le nombre de termes de recherche suggérés qui seront utilisés pour obtenir des résultats dans l'autocomplétion'." +"Stop the extension mechanism when the current search term of the user is suggested.","Arrêter le mécanisme d'extension lorsque le terme de recherche actuel de l'utilisateur fait partie des suggestions." +"Default: No. When set to ""Yes"", this setting will discard the extension mechanism as soon as the exact search term entered by the user is part of the suggestions. Eg : When the user has finished to type ""computer"", if the list of suggested search terms is ""computer"", ""apple computer"", ""computer for kids"", only ""computer"" will be considered as it's exactly what the user has written.","Par défaut : Non. Lorsqu'il est défini sur ""Oui"", ce paramètre arrêtera le mécanisme d'extension dès que le terme de recherche exact saisi par l'utilisateur fait partie des suggestions. Exemple : lorsque l'utilisateur a terminé de taper ""ordinateur"", si la liste des termes de recherche suggérés est ""ordinateur"", ""ordinateur Apple"", ""ordinateur pour enfants"", seul ""ordinateur"" sera pris en compte car c'est exactement ce que l'utilisateur a écrit." diff --git a/src/module-elasticsuite-core/i18n/nl_NL.csv b/src/module-elasticsuite-core/i18n/nl_NL.csv index 748870293..f42871e9d 100644 --- a/src/module-elasticsuite-core/i18n/nl_NL.csv +++ b/src/module-elasticsuite-core/i18n/nl_NL.csv @@ -120,3 +120,12 @@ "If enabled, when indexing a reference like ""DC3000"", it will be as if ""DC3"" was indexed instead (leading to independant elements ""DC"", ""3"" and ""DC3"" in the search index). This will allow someone searching for ""dc3"" or ""dc 3"" to find the product with the exact ""DC3000"" sku.","Indien ingeschakeld, bij het indexeren van een verwijzing zoals ""DC3000"", het zal zijn alsof in plaats daarvan ""DC3"" is geïndexeerd (wat leidt tot onafhankelijke elementen ""DC"", ""3"" en ""DC3"" in de zoekindex). Hierdoor kan iemand het product zoeken naar ""dc3"" of ""dc 3"" vinden met de exacte ""DC3000"" sku." "Reduce series of contiguous zeroes in numeric parts","Verminder serie van aangrenzende nullen in numerieke onderdelen" "If enabled, when indexing a reference like ""PL20004"", it will be as if ""PL204"" was indexed instead (leading to independant elements ""PL"", ""204"" and ""PL204"" in the search index). This will allow someone searching for ""pl204"", ""pl 204"", ""pl2004"" or ""pl 2004"" to find the product with the exact ""PL2004"" sku.","Indien ingeschakeld, bij het indexeren van een verwijzing zoals ""PL20004"", het zal zijn alsof in plaats daarvan ""PL204"" is geïndexeerd (wat leidt tot onafhankelijke elementen ""PL"", ""204"" en ""PL204"" in de zoekindex). Hierdoor kan iemand het product zoeken naar ""pl204"", ""pl 204"", ""pl2004"" of ""pl 2004"" om het te vinden met de exacte ""PL2004"" sku." +"Advanced Settings","Geavanceerde instellingen" +"Use suggested search terms to fetch results","Gebruik voorgestelde zoektermen om resultaten op te halen" +"Default: Yes. When enabled, autocompletion box results will be computed from the current search term the user is typing, but also with the suggested search terms. This is intended to suggest results when the user is in the process of typing. Eg : When the user is typing ""comp"", the popular search term ""computer"" will be suggested, and therefore products or categories matching ""computer"" will be shown.","Standaard: Ja. Wanneer ingeschakeld, worden de resultaten in het autocompletie-venster berekend op basis van de huidige zoekterm die de gebruiker typt, maar ook met de voorgestelde zoektermen. Dit is bedoeld om resultaten voor te stellen terwijl de gebruiker aan het typen is. Bijv.: Wanneer de gebruiker ""comp"" typt, wordt de populaire zoekterm ""computer"" voorgesteld en worden producten of categorieën die overeenkomen met ""computer"" weergegeven." +"Limit the amount of suggested search terms used for autocomplete matching","Beperk het aantal voorgestelde zoektermen dat wordt gebruikt voor autocompletie" +"Default: No. When set to ""No"", this setting will use the maximum number of suggested popular search terms configured in the dedicated section.","Standaard: Nee. Als ingesteld op ""Nee"", gebruikt deze instelling het maximale aantal voorgestelde populaire zoektermen dat is geconfigureerd in het specifieke gedeelte." +"The number of suggested popular search terms to use for fetching results.","Het aantal voorgestelde populaire zoektermen dat wordt gebruikt om resultaten op te halen." +"The number of suggested search terms that will be used for fetching results in the autocompletion box.","Het aantal voorgestelde zoektermen dat zal worden gebruikt om resultaten in het autocompletie-venster op te halen." +"Stop the extension mechanism when the current search term of the user is suggested.","Stop het uitbreidingsmechanisme wanneer de huidige zoekterm van de gebruiker wordt voorgesteld." +"Default: No. When set to ""Yes"", this setting will discard the extension mechanism as soon as the exact search term entered by the user is part of the suggestions. Eg : When the user has finished to type ""computer"", if the list of suggested search terms is ""computer"", ""apple computer"", ""computer for kids"", only ""computer"" will be considered as it's exactly what the user has written.","Standaard: Nee. Als ingesteld op ""Ja"", zal deze instelling het uitbreidingsmechanisme negeren zodra de exacte zoekterm die door de gebruiker is ingevoerd, deel uitmaakt van de suggesties. Bijv.: Wanneer de gebruiker klaar is met typen van ""computer"", en de lijst met voorgestelde zoektermen is ""computer"", ""apple computer"", ""computer voor kinderen"", wordt alleen ""computer"" overwogen omdat dat precies is wat de gebruiker heeft geschreven."