Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Adobe AD0-E722 Exam - Topic 7 Question 58 Discussion

An Adobe Commerce Architect creates a stopword for the Italian locale named stopwordsjtJT.csv and changes the stopword directory to the following: /app/code/Custovendor/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 \Magento\Elasticsearch\SearchAdapter\Query\Preprocessor\Stopwords ClflSS Via di.xml
B) Add a new ClaSS implementing \Magento\Framework\Setup\Patch\PatchInterface to modify the default Value Of elasticsearch\customer\stopwordspath in core.conf ig_data table.
C) Add stopwords to the stopwordsDirectory parameter of the\Hagento\Elasticsearch\Model\Adapter\Document\DirectoryBuilder ClaSS Via stopwords/it.xml and Adobe Commerce will automatically detect the current module.

Adobe AD0-E722 Exam - Topic 7 Question 58 Discussion

Actual exam question for Adobe's AD0-E722 exam
Question #: 58
Topic #: 7
[All AD0-E722 Questions]

An Adobe Commerce Architect creates a stopword for the Italian locale named stopwordsjtJT.csv and changes the stopword directory to the following: /app/code/Custovendor/Elasticsearch/etc/stopwords/

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

Show Suggested Answer Hide Answer
Suggested Answer: A

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.


To change the directory from your module

Configure Elasticsearch stopwords

Contribute your Thoughts:

0/2000 characters
Buddy
2 hours ago
C is interesting too.
upvoted 0 times
...
Esteban
5 days ago
True, but A is simpler for quick changes.
upvoted 0 times
...
Mariann
10 days ago
But it ensures the core config is updated.
upvoted 0 times
...
Buddy
16 days ago
B seems complex though.
upvoted 0 times
...
Mariann
21 days ago
I prefer option B.
upvoted 0 times
...
Esteban
26 days ago
It directly modifies the stopwords directory.
upvoted 0 times
...
Buddy
1 month ago
Why A?
upvoted 0 times
...
Esteban
1 month ago
I think option A is the best choice.
upvoted 0 times
...
Buddy
1 month ago
This question is tricky.
upvoted 0 times
...
Marg
2 months ago
Not sure about C, that seems a bit off to me.
upvoted 0 times
...
Patria
2 months ago
I agree with A, it’s straightforward and effective.
upvoted 0 times
...
Ashley
2 months ago
Wait, can Adobe really auto-detect modules like that? Sounds too easy!
upvoted 0 times
...
Dorathy
2 months ago
I think B is better for modifying core values.
upvoted 0 times
...
Novella
2 months ago
Option A seems like the right way to go.
upvoted 0 times
...
France
2 months ago
I vaguely recall that adding a new class implementing PatchInterface was a way to make changes, but I’m not confident if that applies here.
upvoted 0 times
...
Julieta
3 months ago
I’m a bit confused about the differences between the classes mentioned in the options. I thought we only needed to change the stopwordsDirectory in one place.
upvoted 0 times
...
Amalia
3 months ago
This question seems similar to one we practiced where we had to adjust stopword settings. I feel like option A might be the right approach, but I could be mixing it up.
upvoted 0 times
...
Zana
3 months ago
I think I remember something about modifying the stopwords directory in the XML configuration, but I'm not entirely sure which class to reference.
upvoted 0 times
...

Save Cancel