# Setting default analyzer for everything

**URL:** <https://discuss.elastic.co/t/setting-default-analyzer-for-everything/3862>\
**Category:** Elasticsearch\
**Created:** [February 1, 2011, 11:39pm UTC](https://discuss.elastic.co/t/setting-default-analyzer-for-everything/3862 "2011-02-01T23:39:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Enrique\_Medina\_Monte](https://avatars.discourse-cdn.com/v4/letter/e/4491bb/32.png) [@Enrique\_Medina\_Monte](https://discuss.elastic.co/u/Enrique_Medina_Monte)\
**Post date:** [February 1, 2011, 11:39pm UTC](https://discuss.elastic.co/t/setting-default-analyzer-for-everything/3862/1 "2011-02-01T23:39:47Z")

</div>

Hi,

Being a spanish guy, I created my own analyzer for stemming, accents, etc.  
Now I want to make ES always use this analyzer when indexing my fields, no  
matter which index or mapping they belong to. After some research, I found  
that I have to create a provider for my analyzer and then define the  
following in config/elasticsearch.yml:

index:  
analysis:  
analyzer:  
default:  
type: es.cuestamenos.lucene.analizadores.SpanishAnalyzerProvider

Is this correct? Do I need anything else? Will all "properties" in all  
"mappings" use that analyzer always?

Thanks.

---

<div class="post-metadata">

**Author:** ![Enrique\_Medina\_Monte](https://avatars.discourse-cdn.com/v4/letter/e/4491bb/32.png) [@Enrique\_Medina\_Monte](https://discuss.elastic.co/u/Enrique_Medina_Monte)\
**Post date:** [February 2, 2011, 11:35am UTC](https://discuss.elastic.co/t/setting-default-analyzer-for-everything/3862/2 "2011-02-02T11:35:31Z")

</div>

Any feedback on the below?

On Wed, Feb 2, 2011 at 12:39 AM, Enrique Medina Montenegro \<  
[e.medina.m@gmail.com](mailto:e.medina.m@gmail.com)\> wrote:

> Hi,
> 
> Being a spanish guy, I created my own analyzer for stemming, accents, etc.  
> Now I want to make ES always use this analyzer when indexing my fields, no  
> matter which index or mapping they belong to. After some research, I found  
> that I have to create a provider for my analyzer and then define the  
> following in config/elasticsearch.yml:
> 
> index:  
> analysis:  
> analyzer:  
> default:  
> type: es.cuestamenos.lucene.analizadores.SpanishAnalyzerProvider
> 
> Is this correct? Do I need anything else? Will all "properties" in all  
> "mappings" use that analyzer always?
> 
> Thanks.

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [February 2, 2011, 12:20pm UTC](https://discuss.elastic.co/t/setting-default-analyzer-for-everything/3862/3 "2011-02-02T12:20:11Z")

</div>

Yep, this will set the default analyzer used for any field that does not explicitly define an analyzer.  
On Wednesday, February 2, 2011 at 1:35 PM, Enrique Medina Montenegro wrote:

> Any feedback on the below?
> 
> On Wed, Feb 2, 2011 at 12:39 AM, Enrique Medina Montenegro [e.medina.m@gmail.com](mailto:e.medina.m@gmail.com) wrote:
> 
> > Hi,
> > 
> > Being a spanish guy, I created my own analyzer for stemming, accents, etc. Now I want to make ES always use this analyzer when indexing my fields, no matter which index or mapping they belong to. After some research, I found that I have to create a provider for my analyzer and then define the following in config/elasticsearch.yml:
> > 
> > index:  
> > analysis:  
> > analyzer:  
> > default:  
> > type: es.cuestamenos.lucene.analizadores.SpanishAnalyzerProvider
> > 
> > Is this correct? Do I need anything else? Will all "properties" in all "mappings" use that analyzer always?
> > 
> > Thanks.

---

<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, 4:12am UTC](https://discuss.elastic.co/t/setting-default-analyzer-for-everything/3862/4 "2017-07-06T04:12:53Z")

</div>


