# Some words not analyzed?

**URL:** <https://discuss.elastic.co/t/some-words-not-analyzed/10650>\
**Category:** Elasticsearch\
**Created:** [February 7, 2013, 11:48am UTC](https://discuss.elastic.co/t/some-words-not-analyzed/10650 "2013-02-07T11:48:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrea\_crotti](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@andrea\_crotti](https://discuss.elastic.co/u/andrea_crotti)\
**Post date:** [February 7, 2013, 11:48am UTC](https://discuss.elastic.co/t/some-words-not-analyzed/10650/1 "2013-02-07T11:48:36Z")

</div>

I was starting to notice wrong results and I noticed something very weird.  
This thing fails:

def test\_find\_word\_to(self):  
query = pyes.StringQuery('to', search\_fields='name')  
self.assertEqual(search(query).total, 1)

After I'm manually pushing something in a fresh index with a name "to", how  
is that possible?  
Some words are not handled in the same way?

```
{'name': 'to',

```

'created\_datetime': '2012-01-14T13:11:47Z',  
'doc\_type': 'User',  
'ideas': range(20),  
'description': 'find me'},

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [February 7, 2013, 11:53am UTC](https://discuss.elastic.co/t/some-words-not-analyzed/10650/2 "2013-02-07T11:53:18Z")

</div>

> query = pyes.StringQuery('to', search\_fields='name')  
> self.assertEqual(search(query).total, 1)

'to' is a stopword, which is removed.

you can setup an analyzer which doesn't remove stopwords.

have a look at the section on analysis:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

clint

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![andrea\_crotti](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@andrea\_crotti](https://discuss.elastic.co/u/andrea_crotti)\
**Post date:** [February 7, 2013, 12:20pm UTC](https://discuss.elastic.co/t/some-words-not-analyzed/10650/3 "2013-02-07T12:20:38Z")

</div>

I tried for example also with the 'english' analyzer but still the same...  
So is there anywhere the list of stop words?

2013/2/7 Clinton Gormley [clint@traveljury.com](mailto:clint@traveljury.com):

> > query = pyes.StringQuery('to', search\_fields='name')  
> > self.assertEqual(search(query).total, 1)
> 
> 'to' is a stopword, which is removed.
> 
> you can setup an analyzer which doesn't remove stopwords.
> 
> have a look at the section on analysis:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/index-modules/analysis/)
> 
> clint
> 
> --  
> 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).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 7, 2013, 12:47pm UTC](https://discuss.elastic.co/t/some-words-not-analyzed/10650/4 "2013-02-07T12:47:57Z")

</div>

"to" is an english word!  
Look here: [http://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/analysis/common/src/java/org/apache/lucene/analysis/core/StopAnalyzer.java](http://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/analysis/common/src/java/org/apache/lucene/analysis/core/StopAnalyzer.java)

If you don't want stop words, use a Simple analyzer or build your own analyzer using custom analyzer.

See: [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/index-modules/analysis/simple-analyzer.html)  
and: [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/index-modules/analysis/custom-analyzer.html)

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 7 févr. 2013 à 13:20, andrea crotti [andrea.crotti.0@gmail.com](mailto:andrea.crotti.0@gmail.com) a écrit :

> I tried for example also with the 'english' analyzer but still the same...  
> So is there anywhere the list of stop words?
> 
> 2013/2/7 Clinton Gormley [clint@traveljury.com](mailto:clint@traveljury.com):
> 
> > > query = pyes.StringQuery('to', search\_fields='name')  
> > > self.assertEqual(search(query).total, 1)
> > 
> > 'to' is a stopword, which is removed.
> > 
> > you can setup an analyzer which doesn't remove stopwords.
> > 
> > have a look at the section on analysis:  
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/index-modules/analysis/)
> > 
> > clint
> > 
> > --  
> > 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).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> 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).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:52am UTC](https://discuss.elastic.co/t/some-words-not-analyzed/10650/5 "2017-07-06T02:52:33Z")

</div>


