# Stop phrase removal or remove phrases from search query

**URL:** <https://discuss.elastic.co/t/stop-phrase-removal-or-remove-phrases-from-search-query/20389>\
**Category:** Elasticsearch\
**Created:** [October 22, 2014, 9:29pm UTC](https://discuss.elastic.co/t/stop-phrase-removal-or-remove-phrases-from-search-query/20389 "2014-10-22T21:29:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Srinivasan\_Ramaswamy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/srinivasan_ramaswamy/32/74106_2.png) [@Srinivasan\_Ramaswamy](https://discuss.elastic.co/u/Srinivasan_Ramaswamy)\
**Post date:** [October 22, 2014, 9:29pm UTC](https://discuss.elastic.co/t/stop-phrase-removal-or-remove-phrases-from-search-query/20389/1 "2014-10-22T21:29:05Z")

</div>

Does elasticsearch handle stop phrase removal ? I would like to remove some  
phrases (only if they appear in that order) from the search query.  
Currently i am trying to do this only on the search side. I tried it as  
follows, but it didnt work

curl -XPUT 'localhost:9200/designs\_v1/\_settings' -d '  
{  
"analysis": {  
"filter": {  
"shingle\_omit\_unigrams": {  
"type": "shingle",  
"max\_shingle\_size": 3,  
"output\_unigrams": false  
},  
"my\_stop": {  
"type": "stop",  
"stopwords": ["walt disney", "magic kingdom", "disney",  
"kingdom"]  
}  
},  
"analyzer": {  
"shingle": {  
"type": "custom",  
"tokenizer": "standard",  
"filter": ["lowercase", "my\_stop", "kstem",  
"shingle\_omit\_unigrams"]  
}  
}  
}  
}  
'

Does anyone know whether this feature is supported in elasticsearch ?

Thanks  
Srini

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8bc84b82-45fc-47fc-8c3b-5f809120033b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8bc84b82-45fc-47fc-8c3b-5f809120033b%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:54am UTC](https://discuss.elastic.co/t/stop-phrase-removal-or-remove-phrases-from-search-query/20389/2 "2017-07-06T00:54:21Z")

</div>


