# It does not work "Stop Word"

**URL:** <https://discuss.elastic.co/t/it-does-not-work-stop-word/12961>\
**Category:** Elasticsearch\
**Created:** [July 26, 2013, 5:39pm UTC](https://discuss.elastic.co/t/it-does-not-work-stop-word/12961 "2013-07-26T17:39:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rebeca\_De\_San\_Martin](https://avatars.discourse-cdn.com/v4/letter/r/aeb1de/32.png) [@Rebeca\_De\_San\_Martin](https://discuss.elastic.co/u/Rebeca_De_San_Martin)\
**Post date:** [July 26, 2013, 5:39pm UTC](https://discuss.elastic.co/t/it-does-not-work-stop-word/12961/1 "2013-07-26T17:39:36Z")

</div>

\*Hello!

It does not work "Stop Word"

I have this mapping:\*

fos\_elastica:  
clients:  
default: {host: localhost, port: 9200}  
indexes:  
website:  
settings:  
index:  
analysis:  
analyzer:  
my\_analyzer:  
language: english  
tokenizer: nonutf8letter  
filter: [standard, lowercase, asciifolding,  
stop, custom\_stop]  
tokenizer:  
nonutf8letter:  
type: pattern  
pattern: '[^ \ pL \ pM \ p {Nd} \ p {Nl} \  
p {Pc} [\ p {InEnclosedAlphanumerics} && \ p {So}]]'  
filter:  
custom\_stop:  
type: length  
min: 3  
max: 2000  
types:  
deals:  
mappings:  
id: boost {3}  
nombreoa {analyzer: my\_analyzer}  
idareaestudio:  
type: "nested"  
properties:  
name: {type: String, index: not\_analyzed}  
\*  
When I search "to" bring me everything and I want it excluded.

Any idea what I do wrong?\*

--  
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:** ![ppearcy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppearcy/32/980_2.png) [@ppearcy](https://discuss.elastic.co/u/ppearcy)\
**Post date:** [July 27, 2013, 7:48am UTC](https://discuss.elastic.co/t/it-does-not-work-stop-word/12961/2 "2013-07-27T07:48:03Z")

</div>

Hi,  
It's hard to determine the issue with seeing the data getting indexed and  
the search that is ran. if you create a recreation following the below  
guidelines, you're much more likely to get accurate answers.

> **[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.

Best Regards,  
Paul

On Friday, July 26, 2013 11:39:36 AM UTC-6, Rebeca De San Martin wrote:

> \*Hello!
> 
> It does not work "Stop Word"
> 
> I have this mapping:\*
> 
> fos\_elastica:  
> clients:  
> default: {host: localhost, port: 9200}  
> indexes:  
> website:  
> settings:  
> index:  
> analysis:  
> analyzer:  
> my\_analyzer:  
> language: english  
> tokenizer: nonutf8letter  
> filter: [standard, lowercase,  
> asciifolding, stop, custom\_stop]  
> tokenizer:  
> nonutf8letter:  
> type: pattern  
> pattern: '[^ \ pL \ pM \ p {Nd} \ p {Nl}  
> \ p {Pc} [\ p {InEnclosedAlphanumerics} && \ p {So}]]'  
> filter:  
> custom\_stop:  
> type: length  
> min: 3  
> max: 2000  
> types:  
> deals:  
> mappings:  
> id: boost {3}  
> nombreoa {analyzer: my\_analyzer}  
> idareaestudio:  
> type: "nested"  
> properties:  
> name: {type: String, index: not\_analyzed}  
> \*  
> When I search "to" bring me everything and I want it excluded.
> 
> Any idea what I do wrong?\*

--  
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:** ![Rebeca\_De\_San\_Martin](https://avatars.discourse-cdn.com/v4/letter/r/aeb1de/32.png) [@Rebeca\_De\_San\_Martin](https://discuss.elastic.co/u/Rebeca_De_San_Martin)\
**Post date:** [July 29, 2013, 12:18pm UTC](https://discuss.elastic.co/t/it-does-not-work-stop-word/12961/3 "2013-07-29T12:18:19Z")

</div>

_If I search "to" should exclude all results and get me 0 results and what  
they are doing is bringing me all results where it finds "a". It does not  
work._

El viernes, 26 de julio de 2013 14:39:36 UTC-3, Rebeca De San Martin  
escribió:

> \*Hello!
> 
> It does not work "Stop Word"
> 
> I have this mapping:\*
> 
> fos\_elastica:  
> clients:  
> default: {host: localhost, port: 9200}  
> indexes:  
> website:  
> settings:  
> index:  
> analysis:  
> analyzer:  
> my\_analyzer:  
> language: english  
> tokenizer: nonutf8letter  
> filter: [standard, lowercase,  
> asciifolding, stop, custom\_stop]  
> tokenizer:  
> nonutf8letter:  
> type: pattern  
> pattern: '[^ \ pL \ pM \ p {Nd} \ p {Nl}  
> \ p {Pc} [\ p {InEnclosedAlphanumerics} && \ p {So}]]'  
> filter:  
> custom\_stop:  
> type: length  
> min: 3  
> max: 2000  
> types:  
> deals:  
> mappings:  
> id: boost {3}  
> nombreoa {analyzer: my\_analyzer}  
> idareaestudio:  
> type: "nested"  
> properties:  
> name: {type: String, index: not\_analyzed}  
> \*  
> When I search "to" bring me everything and I want it excluded.
> 
> Any idea what I do wrong?\*

--  
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:** ![ppearcy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppearcy/32/980_2.png) [@ppearcy](https://discuss.elastic.co/u/ppearcy)\
**Post date:** [July 29, 2013, 5:57pm UTC](https://discuss.elastic.co/t/it-does-not-work-stop-word/12961/4 "2013-07-29T17:57:13Z")

</div>

Sorry, still need more context to be of any help. Can you please create a  
curl based recreation as described here:

> **[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.

Minimally, I need to see how the index is created, how the data is indexed,  
and how the data is searched.

Best Regards,  
Paul

On Monday, July 29, 2013 6:18:19 AM UTC-6, Rebeca De San Martin wrote:

> _If I search "to" should exclude all results and get me 0 results and  
> what they are doing is bringing me all results where it finds "a". It  
> does not work._
> 
> El viernes, 26 de julio de 2013 14:39:36 UTC-3, Rebeca De San Martin  
> escribió:
> 
> > \*Hello!
> > 
> > It does not work "Stop Word"
> > 
> > I have this mapping:\*
> > 
> > fos\_elastica:  
> > clients:  
> > default: {host: localhost, port: 9200}  
> > indexes:  
> > website:  
> > settings:  
> > index:  
> > analysis:  
> > analyzer:  
> > my\_analyzer:  
> > language: english  
> > tokenizer: nonutf8letter  
> > filter: [standard, lowercase,  
> > asciifolding, stop, custom\_stop]  
> > tokenizer:  
> > nonutf8letter:  
> > type: pattern  
> > pattern: '[^ \ pL \ pM \ p {Nd} \ p {Nl}  
> > \ p {Pc} [\ p {InEnclosedAlphanumerics} && \ p {So}]]'  
> > filter:  
> > custom\_stop:  
> > type: length  
> > min: 3  
> > max: 2000  
> > types:  
> > deals:  
> > mappings:  
> > id: boost {3}  
> > nombreoa {analyzer: my\_analyzer}  
> > idareaestudio:  
> > type: "nested"  
> > properties:  
> > name: {type: String, index: not\_analyzed  
> > }  
> > \*  
> > When I search "to" bring me everything and I want it excluded.
> > 
> > Any idea what I do wrong?\*

--  
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:** ![ppearcy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppearcy/32/980_2.png) [@ppearcy](https://discuss.elastic.co/u/ppearcy)\
**Post date:** [July 29, 2013, 6:16pm UTC](https://discuss.elastic.co/t/it-does-not-work-stop-word/12961/5 "2013-07-29T18:16:35Z")

</div>

Here's a tip that might help... I like to use facets in order to determine  
what terms are actually being stored in the underlying engine.

So run a query for your specific document and add a facet on the field you  
are having issues with. That will show you if stopwords are actually making  
it into the index or something else is going on.

Best Regards,  
Paul

On Monday, July 29, 2013 11:57:13 AM UTC-6, ppearcy wrote:

> Sorry, still need more context to be of any help. Can you please create a  
> curl based recreation as described here:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/help/)
> 
> Minimally, I need to see how the index is created, how the data is  
> indexed, and how the data is searched.
> 
> Best Regards,  
> Paul
> 
> On Monday, July 29, 2013 6:18:19 AM UTC-6, Rebeca De San Martin wrote:
> 
> > _If I search "to" should exclude all results and get me 0 results and  
> > what they are doing is bringing me all results where it finds "a". It  
> > does not work._
> > 
> > El viernes, 26 de julio de 2013 14:39:36 UTC-3, Rebeca De San Martin  
> > escribió:
> > 
> > > \*Hello!
> > > 
> > > It does not work "Stop Word"
> > > 
> > > I have this mapping:\*
> > > 
> > > fos\_elastica:  
> > > clients:  
> > > default: {host: localhost, port: 9200}  
> > > indexes:  
> > > website:  
> > > settings:  
> > > index:  
> > > analysis:  
> > > analyzer:  
> > > my\_analyzer:  
> > > language: english  
> > > tokenizer: nonutf8letter  
> > > filter: [standard, lowercase,  
> > > asciifolding, stop, custom\_stop]  
> > > tokenizer:  
> > > nonutf8letter:  
> > > type: pattern  
> > > pattern: '[^ \ pL \ pM \ p {Nd} \ p {Nl  
> > > } \ p {Pc} [\ p {InEnclosedAlphanumerics} && \ p {So}]]'  
> > > filter:  
> > > custom\_stop:  
> > > type: length  
> > > min: 3  
> > > max: 2000  
> > > types:  
> > > deals:  
> > > mappings:  
> > > id: boost {3}  
> > > nombreoa {analyzer: my\_analyzer}  
> > > idareaestudio:  
> > > type: "nested"  
> > > properties:  
> > > name: {type: String, index:  
> > > not\_analyzed}  
> > > \*  
> > > When I search "to" bring me everything and I want it excluded.
> > > 
> > > Any idea what I do wrong?\*

--  
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:** ![Rebeca\_De\_San\_Martin](https://avatars.discourse-cdn.com/v4/letter/r/aeb1de/32.png) [@Rebeca\_De\_San\_Martin](https://discuss.elastic.co/u/Rebeca_De_San_Martin)\
**Post date:** [July 29, 2013, 7:35pm UTC](https://discuss.elastic.co/t/it-does-not-work-stop-word/12961/6 "2013-07-29T19:35:33Z")

</div>

_My query combines:_  
_this_:  
[http://www.elasticsearch.org/guide/reference/query-dsl/filtered-query/\*](http://www.elasticsearch.org/guide/reference/query-dsl/filtered-query/*)  
this: \*[http://www.elasticsearch.org/guide/reference/query-dsl/nested-filter/](http://www.elasticsearch.org/guide/reference/query-dsl/nested-filter/)  
\*and this: \*  
[http://www.elasticsearch.org/guide/reference/query-dsl/dis-max-query/](http://www.elasticsearch.org/guide/reference/query-dsl/dis-max-query/)

\*and works perfectly for what I need.  
I just need to add that excluded 2-letter words. Nothing more ..!  
So hard to understand is it?  
\*

--  
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:** ![ppearcy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppearcy/32/980_2.png) [@ppearcy](https://discuss.elastic.co/u/ppearcy)\
**Post date:** [July 30, 2013, 6:15pm UTC](https://discuss.elastic.co/t/it-does-not-work-stop-word/12961/7 "2013-07-30T18:15:24Z")

</div>

It is very hard to understand without any real details 🙂

All I can do at this point is show you a recreation of things working:

> <https://gist.github.com/anonymous/6115360>

Please provide a reproduction to allow others to reproduce and troubleshoot  
the issue or you are likely on your own.

Best Regards,  
Paul

On Monday, July 29, 2013 1:35:33 PM UTC-6, Rebeca De San Martin wrote:

> _My query combines:_  
> _this_:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/query-dsl/filtered-query/)\*  
> this: \*  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/query-dsl/nested-filter/)  
> \*and this: \*  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/query-dsl/dis-max-query/)
> 
> \*and works perfectly for what I need.  
> I just need to add that excluded 2-letter words. Nothing more ..!  
> So hard to understand is it?  
> \*

--  
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:23am UTC](https://discuss.elastic.co/t/it-does-not-work-stop-word/12961/8 "2017-07-06T02:23:40Z")

</div>


