Remove stopwords while querying using GET Request in Elasticsearch

I'm trying to implement Stop Token Filter in an index of Elasticsearch. I've following code taken from here.

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"
 }

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