# How to stop words for the same root word

**URL:** <https://discuss.elastic.co/t/how-to-stop-words-for-the-same-root-word/81886>\
**Category:** Elasticsearch\
**Created:** [April 10, 2017, 10:48pm UTC](https://discuss.elastic.co/t/how-to-stop-words-for-the-same-root-word/81886 "2017-04-10T22:48:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hairinwind](https://avatars.discourse-cdn.com/v4/letter/h/b487fb/32.png) [@hairinwind](https://discuss.elastic.co/u/hairinwind)\
**Post date:** [April 10, 2017, 10:48pm UTC](https://discuss.elastic.co/t/how-to-stop-words-for-the-same-root-word/81886/1 "2017-04-10T22:48:19Z")

</div>

I want to stop all words from the root word "expect", for example, expected, expecting, expectation all shall be stopped.

Here is my mapping.  
PUT /words\_v1  
{  
"settings": {  
"analysis": {  
"analyzer": {  
"extended\_english\_analyzer": {  
"type": "english",  
"stopwords": ["expect"]  
}  
}  
}  
},  
"mappings": {  
"words":{  
"properties": {  
"english": {  
"type": "text",  
"analyzer": "extended\_english\_analyzer",  
"fielddata": true  
}  
}  
}  
}  
}

Then I test it

```
GET /words_v1/_analyze?analyzer=extended_english_analyzer
{"text": "expected expecting"}

```

The result is  
{  
"tokens": [  
{  
"token": "expect",  
"start\_offset": 0,  
"end\_offset": 8,  
"type": "",  
"position": 0  
},  
{  
"token": "expect",  
"start\_offset": 9,  
"end\_offset": 18,  
"type": "",  
"position": 1  
}  
]  
}

You can see "expected" and "expecting" are still tokenized. I want they all be stopped.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 8, 2017, 11:01pm UTC](https://discuss.elastic.co/t/how-to-stop-words-for-the-same-root-word/81886/2 "2017-05-08T23:01:10Z")

</div>

Closed on May 8, 2017, 11:01pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
