# Elastic and language stem (polish)

**URL:** <https://discuss.elastic.co/t/elastic-and-language-stem-polish/15074>\
**Category:** Elasticsearch\
**Created:** [January 2, 2014, 4:26am UTC](https://discuss.elastic.co/t/elastic-and-language-stem-polish/15074 "2014-01-02T04:26:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafath\_Khan](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Rafath\_Khan](https://discuss.elastic.co/u/Rafath_Khan)\
**Post date:** [January 2, 2014, 4:26am UTC](https://discuss.elastic.co/t/elastic-and-language-stem-polish/15074/1 "2014-01-02T04:26:21Z")

</div>

Hello everybody

I'm struggling with polish stem, I've indexed my documents with polish  
stemm

@@elastic.index index: index, type: type, id: data[:id],  
body: {  
settings: {index: {  
analysis: {analyzer: {default: {type: 'snowball', language: 'Polish'}}},  
filter: {my\_stemmer: {type: 'stemmer', name: 'polish'}}  
}},  
type\_id: data[:type\_id], descr: data[:descr].strip,  
search: "#{data[:type\_id]} #{data[:descr]} #{data[:descr].to\_ascii}"}

and now I don't know how to use polish analyzer to make query, can anybody  
provide an example?

I've tried this example:  
[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/analysis-analyzers.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/analysis-analyzers.html)  
but I dont understand which index I should use?

Im using ruby elasticsearch\_api gem like this:

@@elastic.search index: index, type: type, body: {query: {match: {search:query  
}}}

so where this:

index :  
analysis :  
analyzer :  
standard :  
alias: [alias1, alias2]  
type : standard  
stopwords : [test1, test2, test3]

should I put?

I'm using this stemmer:

> **[elastic/elasticsearch-analysis-stempel](https://github.com/elastic/elasticsearch-analysis-stempel)**
>
> elasticsearch-analysis-stempel - Stempel (Polish) Analysis Plugin for Elasticsearch

Thanks for reply,  
best regards and happy new year! 🙂

--  
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/c5201c97-d06b-4780-a7a5-b82fa0611cdb%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c5201c97-d06b-4780-a7a5-b82fa0611cdb%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [January 2, 2014, 6:20pm UTC](https://discuss.elastic.co/t/elastic-and-language-stem-polish/15074/2 "2014-01-02T18:20:29Z")

</div>

Analyzers are associated with fields, so in your mapping you can specify  
which analyzer to use. When you query a field, elasticsearch will know  
which analyzer to use (although it can be overridden). For example:

"title": {"type": "string", "analyzer": "polish"}

If you are using the plugin, there is no need to create your own analyzer,  
except if you want to override the default analyzer.  
index.analysis.analyzer.default

I do not use Ruby, so I do not understand the context of the above example.

Cheers,

Ivan

On Wed, Jan 1, 2014 at 8:26 PM, Rafath Khan [rafathek@gmail.com](mailto:rafathek@gmail.com) wrote:

> Hello everybody
> 
> I'm struggling with polish stem, I've indexed my documents with polish  
> stemm
> 
> @@elastic.index index: index, type: type, id: data[:id],  
> body: {  
> settings: {index: {  
> analysis: {analyzer: {default: {type: 'snowball', language: 'Polish'}}},  
> filter: {my\_stemmer: {type: 'stemmer', name: 'polish'}}  
> }},  
> type\_id: data[:type\_id], descr: data[:descr].strip,  
> search: "#{data[:type\_id]} #{data[:descr]} #{data[:descr].to\_ascii}"}
> 
> and now I don't know how to use polish analyzer to make query, can anybody  
> provide an example?
> 
> I've tried this example:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/analysis-analyzers.html)  
> but I dont understand which index I should use?
> 
> Im using ruby elasticsearch\_api gem like this:
> 
> @@elastic.search index: index, type: type, body: {query: {match: {search:query  
> }}}
> 
> so where this:
> 
> index :  
> analysis :  
> analyzer :  
> standard :  
> alias: [alias1, alias2]  
> type : standard  
> stopwords : [test1, test2, test3]
> 
> should I put?
> 
> I'm using this stemmer:  
> [GitHub - elastic/elasticsearch-analysis-stempel: Stempel (Polish) Analysis Plugin for Elasticsearch](https://github.com/elasticsearch/elasticsearch-analysis-stempel)
> 
> Thanks for reply,  
> best regards and happy new year! 🙂
> 
> --  
> 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/c5201c97-d06b-4780-a7a5-b82fa0611cdb%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c5201c97-d06b-4780-a7a5-b82fa0611cdb%40googlegroups.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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQC89St%2BH-3cwcHHuzzg4pKMgOjPYqcp46qorNW-s8F1YA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQC89St%2BH-3cwcHHuzzg4pKMgOjPYqcp46qorNW-s8F1YA%40mail.gmail.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, 1:58am UTC](https://discuss.elastic.co/t/elastic-and-language-stem-polish/15074/3 "2017-07-06T01:58:37Z")

</div>


