# Default analyser for a single index

**URL:** https://discuss.elastic.co/t/default-analyser-for-a-single-index/6634
**Category:** Elasticsearch
**Created:** [February 8, 2012, 11:05am UTC](https://discuss.elastic.co/t/default-analyser-for-a-single-index/6634 "2012-02-08T11:05:38Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![WeeJames](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weejames/32/3269_2.png) [@WeeJames](https://discuss.elastic.co/u/WeeJames)
#### Post date: [February 8, 2012, 11:05am UTC](https://discuss.elastic.co/t/default-analyser-for-a-single-index/6634/1 "2012-02-08T11:05:38Z")

</div>

Hi,

At the moment i have a default analyser configured for my whole  
cluster. My config/elasticsearch.json looks like this:

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

However I want to use this default analyser for an index called  
'content' only. I know i can set this up by doing a put directly at  
localhost:9200/content/ via curl, but I like to keep my default config  
file up to date in case I ever need to recreate everything from  
scratch its set up automatically.

Can anyone give me any pointers on how i could adjust the config  
listed above to work for the 'content' index only?

Cheers

James

---

<div class="post-metadata">

### Author: ![Karussell1](https://avatars.discourse-cdn.com/v4/letter/k/50afbb/32.png) [@Karussell1](https://discuss.elastic.co/u/Karussell1)
#### Post date: [February 8, 2012, 1:09pm UTC](https://discuss.elastic.co/t/default-analyser-for-a-single-index/6634/2 "2012-02-08T13:09:38Z")

</div>

You can put all the configuration via API (?)

> <https://stackoverflow.com/questions/6275727/define-custom-elasticsearch-analyzer-using-java-api>

> in case I ever need to recreate everything from scratch

what do you mean here?

Peter.

On Feb 8, 12:05 pm, WeeJames [weeja...@gmail.com](mailto:weeja...@gmail.com) wrote:

> Hi,
> 
> At the moment i have a default analyser configured for my whole  
> cluster. My config/elasticsearch.json looks like this:
> 
> [Elasticsearch config · GitHub](https://gist.github.com/1768195)
> 
> However I want to use this default analyser for an index called  
> 'content' only. I know i can set this up by doing a put directly at  
> localhost:9200/content/ via curl, but I like to keep my default config  
> file up to date in case I ever need to recreate everything from  
> scratch its set up automatically.
> 
> Can anyone give me any pointers on how i could adjust the config  
> listed above to work for the 'content' index only?
> 
> Cheers
> 
> James

---

<div class="post-metadata">

### Author: ![WeeJames](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weejames/32/3269_2.png) [@WeeJames](https://discuss.elastic.co/u/WeeJames)
#### Post date: [February 8, 2012, 2:17pm UTC](https://discuss.elastic.co/t/default-analyser-for-a-single-index/6634/3 "2012-02-08T14:17:48Z")

</div>

I know I can put it in via the API.

What i'd like to do is have the indexer stored in a configuration file  
so that if i delete all my indexes and recreate the 'content' index it  
is automatically applied - in the same manner that i have mappings for  
various different types stored as json files in the config/mapping  
directory

On Feb 8, 1:09 pm, Karussell [tableyourt...@googlemail.com](mailto:tableyourt...@googlemail.com) wrote:

> You can put all the configuration via API (?)
> 
> [Define custom ElasticSearch Analyzer using Java API - Stack Overflow](http://stackoverflow.com/q/6275727/194609)
> 
> > in case I ever need to recreate everything from scratch
> 
> what do you mean here?
> 
> Peter.
> 
> On Feb 8, 12:05 pm, WeeJames [weeja...@gmail.com](mailto:weeja...@gmail.com) wrote:
> 
> > Hi,
> 
> > At the moment i have a default analyser configured for my whole  
> > cluster. My config/elasticsearch.json looks like this:
> 
> > [Elasticsearch config · GitHub](https://gist.github.com/1768195)
> 
> > However I want to use this default analyser for an index called  
> > 'content' only. I know i can set this up by doing a put directly at  
> > localhost:9200/content/ via curl, but I like to keep my default config  
> > file up to date in case I ever need to recreate everything from  
> > scratch its set up automatically.
> 
> > Can anyone give me any pointers on how i could adjust the config  
> > listed above to work for the 'content' index only?
> 
> > Cheers
> 
> > James

---

<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 12, 2012, 10:36am UTC](https://discuss.elastic.co/t/default-analyser-for-a-single-index/6634/4 "2012-02-12T10:36:38Z")

</div>

There isn't a way to associate a specific settings with an index (as you can with mappings). It was raised several times, but I don't think an issue was opened to implement it.

On Wednesday, February 8, 2012 at 4:17 PM, WeeJames wrote:

> I know I can put it in via the API.
> 
> What i'd like to do is have the indexer stored in a configuration file  
> so that if i delete all my indexes and recreate the 'content' index it  
> is automatically applied - in the same manner that i have mappings for  
> various different types stored as json files in the config/mapping  
> directory
> 
> On Feb 8, 1:09 pm, Karussell \<[tableyourt...@googlemail.com](mailto:tableyourt...@googlemail.com) ([http://googlemail.com](http://googlemail.com))\> wrote:
> 
> > You can put all the configuration via API (?)
> > 
> > [Define custom ElasticSearch Analyzer using Java API - Stack Overflow](http://stackoverflow.com/q/6275727/194609)
> > 
> > > in case I ever need to recreate everything from scratch
> > 
> > what do you mean here?
> > 
> > Peter.
> > 
> > On Feb 8, 12:05 pm, WeeJames \<[weeja...@gmail.com](mailto:weeja...@gmail.com) ([http://gmail.com](http://gmail.com))\> wrote:
> > 
> > > Hi,
> > 
> > > At the moment i have a default analyser configured for my whole  
> > > cluster. My config/elasticsearch.json looks like this:
> > 
> > > [Elasticsearch config · GitHub](https://gist.github.com/1768195)
> > 
> > > However I want to use this default analyser for an index called  
> > > 'content' only. I know i can set this up by doing a put directly at  
> > > localhost:9200/content/ via curl, but I like to keep my default config  
> > > file up to date in case I ever need to recreate everything from  
> > > scratch its set up automatically.
> > 
> > > Can anyone give me any pointers on how i could adjust the config  
> > > listed above to work for the 'content' index only?
> > 
> > > Cheers
> > 
> > > James

---

<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, 3:39am UTC](https://discuss.elastic.co/t/default-analyser-for-a-single-index/6634/5 "2017-07-06T03:39:52Z")

</div>


