# Stop words not working

**URL:** https://discuss.elastic.co/t/stop-words-not-working/32551
**Category:** Elasticsearch
**Created:** [October 20, 2015, 6:20am UTC](https://discuss.elastic.co/t/stop-words-not-working/32551 "2015-10-20T06:20:40Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![panduranga.rao](https://avatars.discourse-cdn.com/v4/letter/p/c37758/32.png) [@panduranga.rao](https://discuss.elastic.co/u/panduranga.rao)
#### Post date: [October 20, 2015, 6:20am UTC](https://discuss.elastic.co/t/stop-words-not-working/32551/1 "2015-10-20T06:20:41Z")

</div>

I am new to elasticsearch, I am trying to index the with stop words write the query for similarity score but normal and stop words queries are giving same result bellow is my code:

PUT /myindex25  
{  
"settings": {  
"similarity": {  
"default": {  
"type": "default"  
}  
}  
}  
}

PUT /myindex25/question/11  
{  
"stemtext": "elastic search for marvel question type voluptatum",  
"correctoptiontext": "the option data for question1"  
}

GET /myindex25/question/\_search  
{  
"query": {  
"match": {  
"stemtext": {  
"query":"elastic"  
}  
}  
}  
}

* * *

## With stopwords

PUT /my\_index  
{  
"settings": {  
"analysis": {  
"filter": {  
"my\_stop": {  
"type": "stop",  
"stopwords": ["the", "elastic"]  
}  
}  
}  
}  
}

PUT /myindexstopword25/question/11  
{  
"stemtext": "elastic search for marvel question type voluptatum",  
"correctoptiontext": "the option data for question1"  
}

GET /myindexstopword25/question/\_search  
{  
"query": {  
"match": {  
"question.stemtext": {  
"query":"elastic"  
}  
}  
}  
}

any one can please help what is wrong in stop words query.

my expected results is without stop words query I need to get the score and with stop words query, document should not be match as because elastic search is in stop words list

---

<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 5, 2017, 11:43pm UTC](https://discuss.elastic.co/t/stop-words-not-working/32551/2 "2017-07-05T23:43:56Z")

</div>


