What is the correct approach to change the stopwords directory inside the custom module?

An Adobe Commerce Architect creates a stopword for the Italian locale named stopwordsjtJT.csv and changes the stopword directory to the following:

<magento_root>/app/code/Custo«vendor/Elasticsearch/etc/stopwords/

What is the correct approach to change the stopwords directory inside the custom module?
A . Add stopwords to the stopwordsDirectory and CustomerVendor_Elasticsearch to the stopword sModule parameter Of the MagentoElasticsearchSearchAdapterQueryPreprocessorStopwords ClflSS Via di.xml
B . Add a new ClaSS implementing MagentoFrameworkSetupPatchPatchInterface to modify the default Value Of elasticsearchcustomerstopwordspath in core.conf ig_data table.
C . Add stopwords to the stopwordsDirectory parameter of theHagentoElasticsearchModelAdapterDocumentDirectoryBuilder ClaSS Via stopwords/it.xml and Adobe Commerce will automatically detect the current module.

Answer: A

Explanation:

According to the Adobe Commerce documentation, the correct approach to change the stopwords directory inside a custom module is to use dependency injection to override the default values of the

stopwordsDirectory and stopwordsModule parameters of the MagentoElasticsearchSearchAdapterQueryPreprocessorStopwords class. The stopwordsDirectory parameter specifies the relative path of the stopwords directory from the module directory, while the stopwordsModule parameter specifies the name of the module that contains the stopwords directory. By adding these parameters to the di.xml file of the custom module, the Architect can change the location of the stopwords files without modifying the core code or database.

Reference: To change the directory from your module

Configure Elasticsearch stopwords

Latest AD0-E722 Dumps Valid Version with 50 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments