# Italian language support and stemming

**URL:** https://discuss.elastic.co/t/italian-language-support-and-stemming/14540
**Category:** Elasticsearch
**Created:** [November 22, 2013, 10:00am UTC](https://discuss.elastic.co/t/italian-language-support-and-stemming/14540 "2013-11-22T10:00:15Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Stefano\_Masini](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stefano_masini/32/1955_2.png) [@Stefano\_Masini](https://discuss.elastic.co/u/Stefano_Masini)
#### Post date: [November 22, 2013, 10:00am UTC](https://discuss.elastic.co/t/italian-language-support-and-stemming/14540/1 "2013-11-22T10:00:15Z")

</div>

Hi,

I've been playing a bit with ElasticSearch and I'm wondering how good is  
the support for the Italian language.

Here's what I've done:

PUT myindex  
{  
"mappings": {  
"mytype": {  
"properties": {  
"name": {  
"type": "string",  
"analyzer": "italian"  
}  
}  
}  
}  
}

PUT myindex/mytype/1  
{  
"name": "Busta"  
}

PUT myindex/mytype/2  
{  
"name": "Attacco"  
}

Now, if I do a search like this:

GET myindex/mytype/\_search  
{  
"query": {  
"match": {  
"name": "attacchi"  
}  
}  
}

I get 1 result, as expected: "attacchi" is the plural for "attacco".

But if I search for "buste" (which is the plural for "busta"), I get 0  
results.

This seems to me a pretty basic example of stemming in Italian. How well is  
this language supported in ElasticSearch?

Thanks!  
Stefano

--  
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: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [November 23, 2013, 5:57am UTC](https://discuss.elastic.co/t/italian-language-support-and-stemming/14540/2 "2013-11-23T05:57:03Z")

</div>

Hey,

you can simply verify this behaviour yourself using the analyze API

» curl 'localhost:9200/\_analyze?analyzer=italian' -d 'attacchi'  
{"tokens":[{"token":"attacc","start\_offset":0,"end\_offset":8,"type":"","position":1}]}  
» curl 'localhost:9200/\_analyze?analyzer=italian' -d 'attacco'  
{"tokens":[{"token":"attacc","start\_offset":0,"end\_offset":7,"type":"","position":1}]}  
» curl 'localhost:9200/\_analyze?analyzer=italian' -d 'busta'  
{"tokens":[{"token":"busta","start\_offset":0,"end\_offset":5,"type":"","position":1}]}  
» curl 'localhost:9200/\_analyze?analyzer=italian' -d 'buste'  
{"tokens":[{"token":"buste","start\_offset":0,"end\_offset":5,"type":"","position":1}]}

As you can see, the italian analzyer does not work as expected. Be aware  
that most of this analzyers are algorithmic, and thus not very powerful for  
complex languages or irregular parts of it (I dont speak italian, so I cant  
comment on that specific quality).

--Alex

On Fri, Nov 22, 2013 at 11:00 AM, Stefano Masini  
[stefano.masini@gmail.com](mailto:stefano.masini@gmail.com)wrote:

> Hi,
> 
> I've been playing a bit with Elasticsearch and I'm wondering how good is  
> the support for the Italian language.
> 
> Here's what I've done:
> 
> PUT myindex  
> {  
> "mappings": {  
> "mytype": {  
> "properties": {  
> "name": {  
> "type": "string",  
> "analyzer": "italian"  
> }  
> }  
> }  
> }  
> }
> 
> PUT myindex/mytype/1  
> {  
> "name": "Busta"  
> }
> 
> PUT myindex/mytype/2  
> {  
> "name": "Attacco"  
> }
> 
> Now, if I do a search like this:
> 
> GET myindex/mytype/\_search  
> {  
> "query": {  
> "match": {  
> "name": "attacchi"  
> }  
> }  
> }
> 
> I get 1 result, as expected: "attacchi" is the plural for "attacco".
> 
> But if I search for "buste" (which is the plural for "busta"), I get 0  
> results.
> 
> This seems to me a pretty basic example of stemming in Italian. How well  
> is this language supported in Elasticsearch?
> 
> Thanks!  
> Stefano
> 
> --  
> 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: ![javanna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javanna/32/4698_2.png) [@javanna](https://discuss.elastic.co/u/javanna)
#### Post date: [November 25, 2013, 8:57am UTC](https://discuss.elastic.co/t/italian-language-support-and-stemming/14540/3 "2013-11-25T08:57:27Z")

</div>

You can try the hunspell stemmer, which is dictionary based. Usually better  
with european languages but the result really depends on the quality of the  
dictionary.

Cheers

On Saturday, November 23, 2013 6:57:03 AM UTC+1, Alexander Reelsen wrote:

> Hey,
> 
> you can simply verify this behaviour yourself using the analyze API
> 
> » curl 'localhost:9200/\_analyze?analyzer=italian' -d 'attacchi'
> 
> {"tokens":[{"token":"attacc","start\_offset":0,"end\_offset":8,"type":"","position":1}]}  
> » curl 'localhost:9200/\_analyze?analyzer=italian' -d 'attacco'
> 
> {"tokens":[{"token":"attacc","start\_offset":0,"end\_offset":7,"type":"","position":1}]}  
> » curl 'localhost:9200/\_analyze?analyzer=italian' -d 'busta'
> 
> {"tokens":[{"token":"busta","start\_offset":0,"end\_offset":5,"type":"","position":1}]}  
> » curl 'localhost:9200/\_analyze?analyzer=italian' -d 'buste'
> 
> {"tokens":[{"token":"buste","start\_offset":0,"end\_offset":5,"type":"","position":1}]}
> 
> As you can see, the italian analzyer does not work as expected. Be aware  
> that most of this analzyers are algorithmic, and thus not very powerful for  
> complex languages or irregular parts of it (I dont speak italian, so I cant  
> comment on that specific quality).
> 
> --Alex
> 
> On Fri, Nov 22, 2013 at 11:00 AM, Stefano Masini \<[stefano...@gmail.com](mailto:stefano...@gmail.com)\<javascript:\>
> 
> > wrote:
> 
> > Hi,
> > 
> > I've been playing a bit with Elasticsearch and I'm wondering how good is  
> > the support for the Italian language.
> > 
> > Here's what I've done:
> > 
> > PUT myindex  
> > {  
> > "mappings": {  
> > "mytype": {  
> > "properties": {  
> > "name": {  
> > "type": "string",  
> > "analyzer": "italian"  
> > }  
> > }  
> > }  
> > }  
> > }
> > 
> > PUT myindex/mytype/1  
> > {  
> > "name": "Busta"  
> > }
> > 
> > PUT myindex/mytype/2  
> > {  
> > "name": "Attacco"  
> > }
> > 
> > Now, if I do a search like this:
> > 
> > GET myindex/mytype/\_search  
> > {  
> > "query": {  
> > "match": {  
> > "name": "attacchi"  
> > }  
> > }  
> > }
> > 
> > I get 1 result, as expected: "attacchi" is the plural for "attacco".
> > 
> > But if I search for "buste" (which is the plural for "busta"), I get 0  
> > results.
> > 
> > This seems to me a pretty basic example of stemming in Italian. How well  
> > is this language supported in Elasticsearch?
> > 
> > Thanks!  
> > Stefano
> > 
> > --  
> > 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:\>.  
> > 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:05am UTC](https://discuss.elastic.co/t/italian-language-support-and-stemming/14540/4 "2017-07-06T02:05:05Z")

</div>


