QuestionQ3
Customize Commerce featuresAn Adobe Commerce Architect creates an Italian-locale stopword named stopwordsJtJT.csv and changes the stopword directory to:
<magento_root>/app/code/CustomVendor/Elasticsearch/etc/stopwords/
What is the correct way to change the stopwords directory within the custom module?
- A Add stopwords to the stopwordsDirectory and CustomVendor_Elasticsearch to the stopwordsModule parameter of the \Magento\Elasticsearch\SearchAdapter\Query\Preprocessor\Stopwords class via di.xml
- B Add a new class implementing \Magento\Framework\Setup\Patch\PatchInterface to modify the default Value of elasticsearch\custom\stopwordspath in core_config_data table.
- C Add stopwords to the stopwordsDirectory parameter of the \Magento\Elasticsearch\Model\Adapter\Document\DirectoryBuilder class via stopwords/it.xml and Adobe Commerce will automatically detect the current module.
Community Discussion