Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Feature/elasticsearch stopwords #5917

Merged
merged 15 commits into from
Nov 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions guides/v2.3/config-guide/elasticsearch/es-config-stopwords.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ See one of the following topics for more information:

* [Edit stopwords for an existing locale](#config-edit-stopwords)
* [Create stopwords for a new locale](#config-create-stopwords)
* [To change the directory from your module](#to-change-directory-stopwords)

### Edit stopwords for an existing locale {#config-edit-stopwords}

Expand Down Expand Up @@ -126,3 +127,21 @@ To change the directory:
```

Save your changes to `di.xml` and exit the text editor.

## To change the directory from your module {#to-change-directory-stopwords}

1. [Create a new module](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/build/module-file-structure.html){:target="_blank"}
1. In your module `etc/di.xml` add instructions:

```xml
<type name="Magento\Elasticsearch\SearchAdapter\Query\Preprocessor\Stopwords">
<arguments>
<argument name="stopwordsModule" xsi:type="string">Your_Module</argument>
<argument name="stopwordsDirectory" xsi:type="string">stopwords</argument>
</arguments>
</type>
```

1. In your module, create the directory `etc/stopwords`, with the corresponding `.csv`.

Save your changes to `di.xml` and exit the text editor.