# My stopwords filter is not working

**URL:** <https://discuss.elastic.co/t/my-stopwords-filter-is-not-working/7494>\
**Category:** Elasticsearch\
**Created:** [April 27, 2012, 1:31pm UTC](https://discuss.elastic.co/t/my-stopwords-filter-is-not-working/7494 "2012-04-27T13:31:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lyes\_zaiko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lyes_zaiko/32/11250_2.png) [@lyes\_zaiko](https://discuss.elastic.co/u/lyes_zaiko)\
**Post date:** [April 27, 2012, 1:31pm UTC](https://discuss.elastic.co/t/my-stopwords-filter-is-not-working/7494/1 "2012-04-27T13:31:29Z")

</div>

Hi everybody,

can someone tell me if the following custom analyzer definition is correct  
because the stopword filter seems to be not working?

"analysis" : {  
"analyzer" : {  
"default-analyzer" : {  
"type" : "custom",  
"tokenizer" : "standard",  
"filter" : ["mystop", "mystemmer", "lowercase"]  
}  
},

```
        "filter" : {
            "mystemmer" : {
                "type" : "stemmer",
                "language" : "english"
            },

            "mystop" : {
                "type": "stop",
                "stopwords" : ["english"]
            }
        }

    }

```

When I look for the word "the" for example, I get results.

Thank you

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [April 28, 2012, 4:37am UTC](https://discuss.elastic.co/t/my-stopwords-filter-is-not-working/7494/2 "2012-04-28T04:37:46Z")

</div>

The stopwords parameter specifies the actual list of stop words. In your  
case, only one word is treated as a stop word - english.

On Friday, April 27, 2012 9:31:29 AM UTC-4, lyes zaiko wrote:

> Hi everybody,
> 
> can someone tell me if the following custom analyzer definition is  
> correct because the stopword filter seems to be not working?
> 
> "analysis" : {  
> "analyzer" : {  
> "default-analyzer" : {  
> "type" : "custom",  
> "tokenizer" : "standard",  
> "filter" : ["mystop", "mystemmer", "lowercase"]  
> }  
> },
> 
> ```
> "filter" : {
> "mystemmer" : {
> "type" : "stemmer",
> "language" : "english"
> },
>             
> "mystop" : {
> "type": "stop",
> "stopwords" : ["english"]
> }
> }
>     
> }
> 
> ```
> 
> When I look for the word "the" for example, I get results.
> 
> Thank you

---

<div class="post-metadata">

**Author:** ![lyes\_zaiko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lyes_zaiko/32/11250_2.png) [@lyes\_zaiko](https://discuss.elastic.co/u/lyes_zaiko)\
**Post date:** [April 28, 2012, 7:56am UTC](https://discuss.elastic.co/t/my-stopwords-filter-is-not-working/7494/3 "2012-04-28T07:56:52Z")

</div>

Hi!  
Ok I understand now, but if I want to use several stopwords filters, for  
example "english" and "spanish" stopwords. How do I have to proceed?

On Sat, Apr 28, 2012 at 5:37 AM, Igor Motov [imotov@gmail.com](mailto:imotov@gmail.com) wrote:

> The stopwords parameter specifies the actual list of stop words. In your  
> case, only one word is treated as a stop word - english.
> 
> On Friday, April 27, 2012 9:31:29 AM UTC-4, lyes zaiko wrote:
> 
> > Hi everybody,
> > 
> > can someone tell me if the following custom analyzer definition is  
> > correct because the stopword filter seems to be not working?
> > 
> > "analysis" : {  
> > "analyzer" : {  
> > "default-analyzer" : {  
> > "type" : "custom",  
> > "tokenizer" : "standard",  
> > "filter" : ["mystop", "mystemmer", "lowercase"]  
> > }  
> > },
> > 
> > ```
> > "filter" : {
> > "mystemmer" : {
> > "type" : "stemmer",
> > "language" : "english"
> > },
> > 
> > "mystop" : {
> > "type": "stop",
> > "stopwords" : ["english"]
> > }
> > }
> > 
> > }
> > 
> > ```
> > 
> > When I look for the word "the" for example, I get results.
> > 
> > Thank you

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [April 28, 2012, 2:48pm UTC](https://discuss.elastic.co/t/my-stopwords-filter-is-not-working/7494/4 "2012-04-28T14:48:25Z")

</div>

The stopwords parameter uses _lang_ notation:

"stopwords" : ["_english_", "_spanish_"]

On Saturday, April 28, 2012 3:56:52 AM UTC-4, lyes zaiko wrote:

> Hi!  
> Ok I understand now, but if I want to use several stopwords filters, for  
> example "english" and "spanish" stopwords. How do I have to proceed?
> 
> On Sat, Apr 28, 2012 at 5:37 AM, Igor Motov [imotov@gmail.com](mailto:imotov@gmail.com) wrote:
> 
> > The stopwords parameter specifies the actual list of stop words. In your  
> > case, only one word is treated as a stop word - english.
> > 
> > On Friday, April 27, 2012 9:31:29 AM UTC-4, lyes zaiko wrote:
> > 
> > > Hi everybody,
> > > 
> > > can someone tell me if the following custom analyzer definition is  
> > > correct because the stopword filter seems to be not working?
> > > 
> > > "analysis" : {  
> > > "analyzer" : {  
> > > "default-analyzer" : {  
> > > "type" : "custom",  
> > > "tokenizer" : "standard",  
> > > "filter" : ["mystop", "mystemmer", "lowercase"]  
> > > }  
> > > },
> > > 
> > > ```
> > > "filter" : {
> > > "mystemmer" : {
> > > "type" : "stemmer",
> > > "language" : "english"
> > > },
> > >             
> > > "mystop" : {
> > > "type": "stop",
> > > "stopwords" : ["english"]
> > > }
> > > }
> > >     
> > > }
> > > 
> > > ```
> > > 
> > > When I look for the word "the" for example, I get results.
> > > 
> > > Thank you

---

<div class="post-metadata">

**Author:** ![lyes\_zaiko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lyes_zaiko/32/11250_2.png) [@lyes\_zaiko](https://discuss.elastic.co/u/lyes_zaiko)\
**Post date:** [April 30, 2012, 12:52pm UTC](https://discuss.elastic.co/t/my-stopwords-filter-is-not-working/7494/5 "2012-04-30T12:52:05Z")

</div>

Thank you for your indication !

On Sat, Apr 28, 2012 at 3:48 PM, Igor Motov [imotov@gmail.com](mailto:imotov@gmail.com) wrote:

> The stopwords parameter uses _lang_ notation:
> 
> "stopwords" : ["_english_", "_spanish_"]
> 
> On Saturday, April 28, 2012 3:56:52 AM UTC-4, lyes zaiko wrote:
> 
> > Hi!  
> > Ok I understand now, but if I want to use several stopwords filters, for  
> > example "english" and "spanish" stopwords. How do I have to proceed?
> > 
> > On Sat, Apr 28, 2012 at 5:37 AM, Igor Motov [imotov@gmail.com](mailto:imotov@gmail.com) wrote:
> > 
> > > The stopwords parameter specifies the actual list of stop words. In your  
> > > case, only one word is treated as a stop word - english.
> > > 
> > > On Friday, April 27, 2012 9:31:29 AM UTC-4, lyes zaiko wrote:
> > > 
> > > > Hi everybody,
> > > > 
> > > > can someone tell me if the following custom analyzer definition is  
> > > > correct because the stopword filter seems to be not working?
> > > > 
> > > > "analysis" : {  
> > > > "analyzer" : {  
> > > > "default-analyzer" : {  
> > > > "type" : "custom",  
> > > > "tokenizer" : "standard",  
> > > > "filter" : ["mystop", "mystemmer", "lowercase"]  
> > > > }  
> > > > },
> > > > 
> > > > ```
> > > > "filter" : {
> > > > "mystemmer" : {
> > > > "type" : "stemmer",
> > > > "language" : "english"
> > > > },
> > > > 
> > > > "mystop" : {
> > > > "type": "stop",
> > > > "stopwords" : ["english"]
> > > > }
> > > > }
> > > > 
> > > > }
> > > > 
> > > > ```
> > > > 
> > > > When I look for the word "the" for example, I get results.
> > > > 
> > > > Thank you

---

<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:** [July 6, 2017, 3:30am UTC](https://discuss.elastic.co/t/my-stopwords-filter-is-not-working/7494/6 "2017-07-06T03:30:34Z")

</div>


