# Remove stopwords while querying using GET Request in Elasticsearch

**URL:** <https://discuss.elastic.co/t/remove-stopwords-while-querying-using-get-request-in-elasticsearch/197670>\
**Category:** Elasticsearch\
**Created:** [September 2, 2019, 10:30am UTC](https://discuss.elastic.co/t/remove-stopwords-while-querying-using-get-request-in-elasticsearch/197670 "2019-09-02T10:30:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamshaid](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jamshaid/32/52403_2.png) [@jamshaid](https://discuss.elastic.co/u/jamshaid)\
**Post date:** [September 2, 2019, 10:30am UTC](https://discuss.elastic.co/t/remove-stopwords-while-querying-using-get-request-in-elasticsearch/197670/1 "2019-09-02T10:30:13Z")

</div>

I'm trying to implement `Stop Token Filter` in an index of Elasticsearch. I've following code taken from [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-stop-tokenfilter.html#analysis-stop-tokenfilter).

```
PUT /test1
{
"settings": {
    "analysis": {
        "filter": {
            "my_stop": {
                "type": "stop",
                "stopwords": "_english_"
            }
            
        }
    }
}
} 

```

I have my data stored in `JSON` format and have a field named as **Ingredients** which contains stopped words. I want to search through the whole index (containing almost 80k records) about the top 100 most appeared values in **Ingredients** tag. The query I'm using to retrieve the results is

```
GET test1/_search?size=0&pretty
{
"aggs": {
"genres": {
  "terms": {
    "field": "Ingredients",
    "size": 100,
    "exclude": "[0-9].*"
  }
}
}
}

```

I need to exclude Numbers from it for which I'm using `exclude`.  
But applying the above query using `Kibana` it doesn't remove the `Stop Words` and keeps them displayed while querying response.  
As per the documentation, it should remove the stopped words but it isn't doing that. I'm unable to find the cause as I'm a newbie in `Elasticsearch`. Please help me figure it out.  
I'm using `elasticsearch-7.3.1` and `Kibana-7.3.1`.  
I'm working over it for about two days but none of the methods is working. Thanks! Any help would be really appreciated.

If I try it using this way, it works but while putting the `GET` request as per the method defined above, it doesn't work at all.

```
POST test1/_analyze
{
 "analyzer": "my_stop",
 "text": "House of Dickson<br> corp"
 }

```

---

<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:** [September 30, 2019, 10:30am UTC](https://discuss.elastic.co/t/remove-stopwords-while-querying-using-get-request-in-elasticsearch/197670/2 "2019-09-30T10:30:26Z")

</div>

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