Skip to content

Commit

Permalink
Add file path example
Browse files Browse the repository at this point in the history
Signed-off-by: Fanit Kolchina <[email protected]>
  • Loading branch information
kolchfa-aws committed Dec 10, 2024
1 parent e476e39 commit 544265a
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions _analyzers/stop.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,32 @@ PUT /my_new_custom_stop_index
}
```
{% include copy-curl.html %}

The following example request specifies a path to the file containing stopwords:

```json
PUT /my_new_custom_stop_index
{
"settings": {
"analysis": {
"analyzer": {
"my_custom_stop_analyzer": {
"type": "stop",
"stopwords_path": "stopwords.txt"
}
}
}
},
"mappings": {
"properties": {
"description": {
"type": "text",
"analyzer": "my_custom_stop_analyzer"
}
}
}
}
```
{% include copy-curl.html %}

In this example, the file is located in the config directory. You can also specify a full path to the file.

0 comments on commit 544265a

Please sign in to comment.