# Phrases With Stop Words

**URL:** <https://discuss.elastic.co/t/phrases-with-stop-words/3819>\
**Category:** Elasticsearch\
**Created:** [January 22, 2011, 7:23pm UTC](https://discuss.elastic.co/t/phrases-with-stop-words/3819 "2011-01-22T19:23:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![timscott](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timscott/32/3220_2.png) [@timscott](https://discuss.elastic.co/u/timscott)\
**Post date:** [January 22, 2011, 7:23pm UTC](https://discuss.elastic.co/t/phrases-with-stop-words/3819/1 "2011-01-22T19:23:31Z")

</div>

I notice is that phrase searches containing stop words will never matc  
any document. For example a field or term search for "Bank of  
America" would have no hits. I understand why this is, but it's  
useless to try to explain it to a user.

Is there a reasonable solution without indexing stop words?

I tried one way, but it does not seem to work. I thought if I could  
get a list of stop words in use by the current analyzer, I could  
remove them from search phrases. So if the user searches for "Bank of  
America" I would remove "of" and search for the phrase "Bank  
America". Because the analyzer had removed "of" I was thinking that  
ES would actually see "Bank" and "America" as adjacent words and match  
on the "Bank America" search phrase. It seems this does not work.  
Perhaps the index leaves a "hole" where the stop word was and so does  
not see "Bank" and "America" as adjacent?

If the aforementioned solution did actually work, then a search for  
"Bank of America" would also match instances of "Bank and America",  
"Bank the America" and so forth. I can live with that, no problem.

By the way, I seem to recall a recent thread on this topic, but I  
could not find it, thus a new thread.

---

<div class="post-metadata">

**Author:** ![srrin](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@srrin](https://discuss.elastic.co/u/srrin)\
**Post date:** [June 15, 2011, 1:08pm UTC](https://discuss.elastic.co/t/phrases-with-stop-words/3819/2 "2011-06-15T13:08:27Z")

</div>

Hi Shay,  
I am having the same issue with my search capability. Can you provide any work around for this issue.

Thanks  
srrin

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [June 15, 2011, 1:16pm UTC](https://discuss.elastic.co/t/phrases-with-stop-words/3819/3 "2011-06-15T13:16:46Z")

</div>

Srrin

On Wed, 2011-06-15 at 06:08 -0700, srrin wrote:

> Hi Shay, I am having the same issue with my search capability. Can you  
> provide any work around for this issue. Thanks srrin

This is not a useful email.

We don't know what the issue is.

Please read [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/help) for advice about how to  
ask questions on the mailing list

clint

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [June 15, 2011, 1:57pm UTC](https://discuss.elastic.co/t/phrases-with-stop-words/3819/4 "2011-06-15T13:57:48Z")

</div>

Tim,

Sorry for the late response, I must have missed your mail. In 0.16.2, the new text family of queries should help, give it a go.

-shay.banon

On Saturday, January 22, 2011 at 9:23 PM, Tim Scott wrote:

> I notice is that phrase searches containing stop words will never matc  
> any document. For example a field or term search for "Bank of  
> America" would have no hits. I understand why this is, but it's  
> useless to try to explain it to a user.
> 
> Is there a reasonable solution without indexing stop words?
> 
> I tried one way, but it does not seem to work. I thought if I could  
> get a list of stop words in use by the current analyzer, I could  
> remove them from search phrases. So if the user searches for "Bank of  
> America" I would remove "of" and search for the phrase "Bank  
> America". Because the analyzer had removed "of" I was thinking that  
> ES would actually see "Bank" and "America" as adjacent words and match  
> on the "Bank America" search phrase. It seems this does not work.  
> Perhaps the index leaves a "hole" where the stop word was and so does  
> not see "Bank" and "America" as adjacent?
> 
> If the aforementioned solution did actually work, then a search for  
> "Bank of America" would also match instances of "Bank and America",  
> "Bank the America" and so forth. I can live with that, no problem.
> 
> By the way, I seem to recall a recent thread on this topic, but I  
> could not find it, thus a new thread.

---

<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, 4:03am UTC](https://discuss.elastic.co/t/phrases-with-stop-words/3819/5 "2017-07-06T04:03:27Z")

</div>


