# Search issue with snowball stemmer

**URL:** https://discuss.elastic.co/t/search-issue-with-snowball-stemmer/17807
**Category:** Elasticsearch
**Created:** [May 29, 2014, 2:13pm UTC](https://discuss.elastic.co/t/search-issue-with-snowball-stemmer/17807 "2014-05-29T14:13:41Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![alexshaman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexshaman/32/1497_2.png) [@alexshaman](https://discuss.elastic.co/u/alexshaman)
#### Post date: [May 29, 2014, 2:13pm UTC](https://discuss.elastic.co/t/search-issue-with-snowball-stemmer/17807/1 "2014-05-29T14:13:41Z")

</div>

Hello everyone,

I have follow index mapping:

curl -XPUT 'http://localhost:9200/some\_content/' -d ' { "settings":{ "query\_string":{ "default\_con":"content", "default\_operator":"AND" }, "index":{ "analysis":{ "analyzer":{ "en\_analyser":{ "filter":["snowBallFilter"], "type":"custom", "tokenizer":"standard" } }, "filter":{ "en\_stopFilter":{ "type":"stop", "stopwords\_path":"lang/stopwords\_en.txt" }, "snowBallFilter":{ "type":"snowball", "language":"English" }, "wordDelimiterFilter":{ "catenate\_all":false, "catenate\_words":true, "catenate\_numbers":true, "generate\_word\_parts":true, "generate\_number\_parts":true, "preserve\_original":true, "type":"word\_delimiter", "split\_on\_case\_change":true }, "en\_synonymFilter":{ "synonyms\_path":"lang/synonyms\_en.txt", "ignore\_case":true, "type":"synonym", "expand":false }, "lengthFilter":{ "max":250, "type":"length", "min":3 } } } } }, "mappings":{ "docs":{ "\_source":{ "enabled":false }, "analyzer":"en\_analyser", "properties":{ "content":{ "type":"string", "index":"analyzed", "term\_vector":"with\_positions\_offsets", "omit\_norms":"true" } } } } }'

and I posted the next content:

curl -XPOST [http://localhost:9200/some\_content/docs/](http://localhost:9200/some_content/docs/) -d '  
{  
"content" : "Some sampling text formatted for text data"  
}'

When I make this one request:  
_[http://epbyvitw0052:9200/some\_content/docs/\_search?q=sampling](http://epbyvitw0052:9200/some_content/docs/_search?q=sampling)_

I'm getting result:  
  
{  
"took": 1,  
"timed\_out": false,  
"\_shards": {  
"total": 1,  
"successful": 1,  
"failed": 0  
},  
"hits": {  
"total": 1,  
"max\_score": 0.095891505,  
"hits": [  
{  
"\_index": "some\_content",  
"\_type": "docs",  
"\_id": "saLfx6PYR82YR69je0JbAA",  
"\_score": 0.095891505  
}  
]  
}  
}

but when I send request without type:  
_[http://epbyvitw0052:9200/some\_content/\_search?q=sampling](http://epbyvitw0052:9200/some_content/_search?q=sampling)_

then I'm getting nothing:  
  
{  
"took": 1,  
"timed\_out": false,  
"\_shards": {  
"total": 1,  
"successful": 1,  
"failed": 0  
},  
"hits": {  
"total": 0,  
"max\_score": null,  
"hits": []  
}  
}

although, I can make the next request with term:  
_[http://epbyvitw0052:9200/some\_content/\_search?q=sampl](http://epbyvitw0052:9200/some_content/_search?q=sampl)_

the system found it:  
  
{  
"took": 1,  
"timed\_out": false,  
"\_shards": {  
"total": 1,  
"successful": 1,  
"failed": 0  
},  
"hits": {  
"total": 1,  
"max\_score": 0.095891505,  
"hits": [  
{  
"\_index": "some\_content",  
"\_type": "docs",  
"\_id": "saLfx6PYR82YR69je0JbAA",  
"\_score": 0.095891505  
}  
]  
}  
}

It's issue appear when I put snowball filter into analyzer.  
Could you explain why the system has such behavior?  
May be I do something 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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/9b919926-3384-4d72-845a-c73790d05281%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9b919926-3384-4d72-845a-c73790d05281%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)
#### Post date: [May 29, 2014, 4:45pm UTC](https://discuss.elastic.co/t/search-issue-with-snowball-stemmer/17807/2 "2014-05-29T16:45:05Z")

</div>

You should use the Analyze API to ensure that the tokens you are producing  
are correct:

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

--  
Ivan

On Thu, May 29, 2014 at 7:13 AM, Александр Шаманов [al3xshaman@gmail.com](mailto:al3xshaman@gmail.com)wrote:

> Hello everyone,
> 
> I have follow index mapping:
> 
> curl -XPUT 'http://localhost:9200/some\_content/' -d ' { "settings":{ "query\_string":{ "default\_con":"content", "default\_operator":"AND" }, "index":{ "analysis":{ "analyzer":{ "en\_analyser":{ "filter":["snowBallFilter"], "type":"custom", "tokenizer":"standard" } }, "filter":{ "en\_stopFilter":{ "type":"stop", "stopwords\_path":"lang/stopwords\_en.txt" }, "snowBallFilter":{ "type":"snowball", "language":"English" }, "wordDelimiterFilter":{ "catenate\_all":false, "catenate\_words":true, "catenate\_numbers":true, "generate\_word\_parts":true, "generate\_number\_parts":true, "preserve\_original":true, "type":"word\_delimiter", "split\_on\_case\_change":true }, "en\_synonymFilter":{ "synonyms\_path":"lang/synonyms\_en.txt", "ignore\_case":true, "type":"synonym", "expand":false }, "lengthFilter":{ "max":250, "type":"length", "min":3 } } } } }, "mappings":{ "docs":{ "\_source":{ "enabled":false }, "analyzer":"en\_analyser", "properties":{ "content":{ "type":"string", "index":"analyzed", "term\_vector":"with\_positions\_offsets", "omit\_norms":"true" } } } } }'
> 
> and I posted the next content:
> 
> curl -XPOST [http://localhost:9200/some\_content/docs/](http://localhost:9200/some_content/docs/) -d '  
> {  
> "content" : "Some sampling text formatted for text data"  
> }'
> 
> When I make this one request:  
> _[http://epbyvitw0052:9200/some\_content/docs/\_search?q=sampling](http://epbyvitw0052:9200/some_content/docs/_search?q=sampling)_
> 
> I'm getting result:  
>   
> {  
> "took": 1,  
> "timed\_out": false,  
> "\_shards": {  
> "total": 1,  
> "successful": 1,  
> "failed": 0  
> },  
> "hits": {  
> "total": 1,  
> "max\_score": 0.095891505,  
> "hits": [  
> {  
> "\_index": "some\_content",  
> "\_type": "docs",  
> "\_id": "saLfx6PYR82YR69je0JbAA",  
> "\_score": 0.095891505  
> }  
> ]  
> }  
> }
> 
> but when I send request without type:  
> _[http://epbyvitw0052:9200/some\_content/\_search?q=sampling](http://epbyvitw0052:9200/some_content/_search?q=sampling)_
> 
> then I'm getting nothing:  
>   
> {  
> "took": 1,  
> "timed\_out": false,  
> "\_shards": {  
> "total": 1,  
> "successful": 1,  
> "failed": 0  
> },  
> "hits": {  
> "total": 0,  
> "max\_score": null,  
> "hits":   
> }  
> }
> 
> although, I can make the next request with term:  
> _[http://epbyvitw0052:9200/some\_content/\_search?q=sampl](http://epbyvitw0052:9200/some_content/_search?q=sampl)_
> 
> the system found it:  
>   
> {  
> "took": 1,  
> "timed\_out": false,  
> "\_shards": {  
> "total": 1,  
> "successful": 1,  
> "failed": 0  
> },  
> "hits": {  
> "total": 1,  
> "max\_score": 0.095891505,  
> "hits": [  
> {  
> "\_index": "some\_content",  
> "\_type": "docs",  
> "\_id": "saLfx6PYR82YR69je0JbAA",  
> "\_score": 0.095891505  
> }  
> ]  
> }  
> }
> 
> It's issue appear when I put snowball filter into analyzer.  
> Could you explain why the system has such behavior?  
> May be I do something 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).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/9b919926-3384-4d72-845a-c73790d05281%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9b919926-3384-4d72-845a-c73790d05281%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/9b919926-3384-4d72-845a-c73790d05281%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/9b919926-3384-4d72-845a-c73790d05281%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CALY%3DcQCt6GgkDOkoh-Ti2FQFsPzPQrKyaCu7p63%2B1NSkuY\_9NQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCt6GgkDOkoh-Ti2FQFsPzPQrKyaCu7p63%2B1NSkuY_9NQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![alexshaman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexshaman/32/1497_2.png) [@alexshaman](https://discuss.elastic.co/u/alexshaman)
#### Post date: [May 30, 2014, 6:24am UTC](https://discuss.elastic.co/t/search-issue-with-snowball-stemmer/17807/3 "2014-05-30T06:24:46Z")

</div>

In the beginning, I thought a cause is sitting of analyzers, but I have  
this issue when I put other stemmers. If I don't use any stemmers the  
request _[http://epbyvitw0052:9200/some\_content/\_search?q=sampling](http://epbyvitw0052:9200/some_content/_search?q=sampling)_  
returns me necessary index. I think it's problem with implementation of  
adding some stemmers.

четверг, 29 мая 2014 г., 19:45:12 UTC+3 пользователь Ivan Brusic написал:

> You should use the Analyze API to ensure that the tokens you are producing  
> are correct:
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-analyze.html)
> 
> --  
> Ivan
> 
> On Thu, May 29, 2014 at 7:13 AM, Александр Шаманов \<[al3xs...@gmail.com](mailto:al3xs...@gmail.com)  
> \<javascript:\>\> wrote:
> 
> > Hello everyone,
> > 
> > I have follow index mapping:
> > 
> > curl -XPUT 'http://localhost:9200/some\_content/' -d ' { "settings":{ "query\_string":{ "default\_con":"content", "default\_operator":"AND" }, "index":{ "analysis":{ "analyzer":{ "en\_analyser":{ "filter":["snowBallFilter"], "type":"custom", "tokenizer":"standard" } }, "filter":{ "en\_stopFilter":{ "type":"stop", "stopwords\_path":"lang/stopwords\_en.txt" }, "snowBallFilter":{ "type":"snowball", "language":"English" }, "wordDelimiterFilter":{ "catenate\_all":false, "catenate\_words":true, "catenate\_numbers":true, "generate\_word\_parts":true, "generate\_number\_parts":true, "preserve\_original":true, "type":"word\_delimiter", "split\_on\_case\_change":true }, "en\_synonymFilter":{ "synonyms\_path":"lang/synonyms\_en.txt", "ignore\_case":true, "type":"synonym", "expand":false }, "lengthFilter":{ "max":250, "type":"length", "min":3 } } } } }, "mappings":{ "docs":{ "\_source":{ "enabled":false }, "analyzer":"en\_analyser", "properties":{ "content":{ "type":"string", "index":"analyzed", "term\_vector":"with\_positions\_offsets", "omit\_norms":"true" } } } } }'
> > 
> > and I posted the next content:
> > 
> > curl -XPOST [http://localhost:9200/some\_content/docs/](http://localhost:9200/some_content/docs/) -d '  
> > {  
> > "content" : "Some sampling text formatted for text data"  
> > }'
> > 
> > When I make this one request:  
> > _[http://epbyvitw0052:9200/some\_content/docs/\_search?q=sampling](http://epbyvitw0052:9200/some_content/docs/_search?q=sampling)_
> > 
> > I'm getting result:  
> >   
> > {  
> > "took": 1,  
> > "timed\_out": false,  
> > "\_shards": {  
> > "total": 1,  
> > "successful": 1,  
> > "failed": 0  
> > },  
> > "hits": {  
> > "total": 1,  
> > "max\_score": 0.095891505,  
> > "hits": [  
> > {  
> > "\_index": "some\_content",  
> > "\_type": "docs",  
> > "\_id": "saLfx6PYR82YR69je0JbAA",  
> > "\_score": 0.095891505  
> > }  
> > ]  
> > }  
> > }
> > 
> > but when I send request without type:  
> > _[http://epbyvitw0052:9200/some\_content/\_search?q=sampling](http://epbyvitw0052:9200/some_content/_search?q=sampling)_
> > 
> > then I'm getting nothing:  
> >   
> > {  
> > "took": 1,  
> > "timed\_out": false,  
> > "\_shards": {  
> > "total": 1,  
> > "successful": 1,  
> > "failed": 0  
> > },  
> > "hits": {  
> > "total": 0,  
> > "max\_score": null,  
> > "hits":   
> > }  
> > }
> > 
> > although, I can make the next request with term:  
> > _[http://epbyvitw0052:9200/some\_content/\_search?q=sampl](http://epbyvitw0052:9200/some_content/_search?q=sampl)_
> > 
> > the system found it:  
> >   
> > {  
> > "took": 1,  
> > "timed\_out": false,  
> > "\_shards": {  
> > "total": 1,  
> > "successful": 1,  
> > "failed": 0  
> > },  
> > "hits": {  
> > "total": 1,  
> > "max\_score": 0.095891505,  
> > "hits": [  
> > {  
> > "\_index": "some\_content",  
> > "\_type": "docs",  
> > "\_id": "saLfx6PYR82YR69je0JbAA",  
> > "\_score": 0.095891505  
> > }  
> > ]  
> > }  
> > }
> > 
> > It's issue appear when I put snowball filter into analyzer.  
> > Could you explain why the system has such behavior?  
> > May be I do something 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/9b919926-3384-4d72-845a-c73790d05281%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9b919926-3384-4d72-845a-c73790d05281%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/9b919926-3384-4d72-845a-c73790d05281%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/9b919926-3384-4d72-845a-c73790d05281%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/b17e3c57-cae4-4150-940d-49dd657215dc%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b17e3c57-cae4-4150-940d-49dd657215dc%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, 1:25am UTC](https://discuss.elastic.co/t/search-issue-with-snowball-stemmer/17807/4 "2017-07-06T01:25:55Z")

</div>


