# Can't get template working with mappings and analysis defined

**URL:** <https://discuss.elastic.co/t/cant-get-template-working-with-mappings-and-analysis-defined/9632>\
**Category:** Elasticsearch\
**Created:** [November 8, 2012, 3:43pm UTC](https://discuss.elastic.co/t/cant-get-template-working-with-mappings-and-analysis-defined/9632 "2012-11-08T15:43:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rogerio\_Pereira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rogerio_pereira/32/2635_2.png) [@Rogerio\_Pereira](https://discuss.elastic.co/u/Rogerio_Pereira)\
**Post date:** [November 8, 2012, 3:43pm UTC](https://discuss.elastic.co/t/cant-get-template-working-with-mappings-and-analysis-defined/9632/1 "2012-11-08T15:43:11Z")

</div>

Hi, I tried to configure the mappings and analyzers in several ways in my  
template, but nothing seens to be working:

Here's my configuration:

[https://gist.github.com/4039557](https://gist.github.com/4039557)

If it run:

curl -XGET localhost:9200/booksearch/\_mapping && echo  
or  
curl -XGET localhost:9200/booksearch/\_settings && echo

none of my custom settings are displayed.

Any ideas why?

--

---

<div class="post-metadata">

**Author:** ![Rogerio\_Pereira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rogerio_pereira/32/2635_2.png) [@Rogerio\_Pereira](https://discuss.elastic.co/u/Rogerio_Pereira)\
**Post date:** [November 8, 2012, 4:21pm UTC](https://discuss.elastic.co/t/cant-get-template-working-with-mappings-and-analysis-defined/9632/2 "2012-11-08T16:21:24Z")

</div>

Is this the correct syntax for analysis section in a template file? I tried  
several way to configure analyzers, but nothing seens to work.

Em quinta-feira, 8 de novembro de 2012 13h43min12s UTC-2, Rogerio Pereira  
escreveu:

> Hi, I tried to configure the mappings and analyzers in several ways in my  
> template, but nothing seens to be working:
> 
> Here's my configuration:
> 
> [https://gist.github.com/4039557](https://gist.github.com/4039557)
> 
> If it run:
> 
> curl -XGET localhost:9200/booksearch/\_mapping && echo  
> or  
> curl -XGET localhost:9200/booksearch/\_settings && echo
> 
> none of my custom settings are displayed.
> 
> Any ideas why?

--

---

<div class="post-metadata">

**Author:** ![radu\_gheorghe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_gheorghe/32/556_2.png) [@radu\_gheorghe](https://discuss.elastic.co/u/radu_gheorghe)\
**Post date:** [November 9, 2012, 11:26am UTC](https://discuss.elastic.co/t/cant-get-template-working-with-mappings-and-analysis-defined/9632/3 "2012-11-09T11:26:51Z")

</div>

Hello Rogerio,

The only thing I can spot is that your "analysis" section should go  
under the "settings" section.

## Best regards, Radu

[http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene

On Thu, Nov 8, 2012 at 6:21 PM, Rogerio Pereira  
[rogerio.araujo@gmail.com](mailto:rogerio.araujo@gmail.com) wrote:

> Is this the correct syntax for analysis section in a template file? I tried  
> several way to configure analyzers, but nothing seens to work.
> 
> Em quinta-feira, 8 de novembro de 2012 13h43min12s UTC-2, Rogerio Pereira  
> escreveu:
> 
> > Hi, I tried to configure the mappings and analyzers in several ways in my  
> > template, but nothing seens to be working:
> > 
> > Here's my configuration:
> > 
> > [https://gist.github.com/4039557](https://gist.github.com/4039557)
> > 
> > If it run:
> > 
> > curl -XGET localhost:9200/booksearch/\_mapping && echo  
> > or  
> > curl -XGET localhost:9200/booksearch/\_settings && echo
> > 
> > none of my custom settings are displayed.
> > 
> > Any ideas why?
> 
> --

--

---

<div class="post-metadata">

**Author:** ![Rogerio\_Pereira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rogerio_pereira/32/2635_2.png) [@Rogerio\_Pereira](https://discuss.elastic.co/u/Rogerio_Pereira)\
**Post date:** [November 9, 2012, 8:49pm UTC](https://discuss.elastic.co/t/cant-get-template-working-with-mappings-and-analysis-defined/9632/4 "2012-11-09T20:49:39Z")

</div>

I also tried put analysis under "settings" section, no success.

Em sexta-feira, 9 de novembro de 2012 09h26min54s UTC-2, Radu Gheorghe  
escreveu:

> Hello Rogerio,
> 
> The only thing I can spot is that your "analysis" section should go  
> under the "settings" section.
> 
> ## Best regards, Radu
> 
> [http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene
> 
> On Thu, Nov 8, 2012 at 6:21 PM, Rogerio Pereira  
> \<[rogerio...@gmail.com](mailto:rogerio...@gmail.com) \<javascript:\>\> wrote:
> 
> > Is this the correct syntax for analysis section in a template file? I  
> > tried  
> > several way to configure analyzers, but nothing seens to work.
> > 
> > Em quinta-feira, 8 de novembro de 2012 13h43min12s UTC-2, Rogerio  
> > Pereira  
> > escreveu:
> > 
> > > Hi, I tried to configure the mappings and analyzers in several ways in  
> > > my  
> > > template, but nothing seens to be working:
> > > 
> > > Here's my configuration:
> > > 
> > > [https://gist.github.com/4039557](https://gist.github.com/4039557)
> > > 
> > > If it run:
> > > 
> > > curl -XGET localhost:9200/booksearch/\_mapping && echo  
> > > or  
> > > curl -XGET localhost:9200/booksearch/\_settings && echo
> > > 
> > > none of my custom settings are displayed.
> > > 
> > > Any ideas why?
> > 
> > --

--

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [November 10, 2012, 1:55am UTC](https://discuss.elastic.co/t/cant-get-template-working-with-mappings-and-analysis-defined/9632/5 "2012-11-10T01:55:32Z")

</div>

"analysis" should be under "settings" and "author" should have "_analyzer_":  
"multivalue\_analyzer".

On Friday, November 9, 2012 3:49:40 PM UTC-5, Rogerio Pereira wrote:

> I also tried put analysis under "settings" section, no success.
> 
> Em sexta-feira, 9 de novembro de 2012 09h26min54s UTC-2, Radu Gheorghe  
> escreveu:
> 
> > Hello Rogerio,
> > 
> > The only thing I can spot is that your "analysis" section should go  
> > under the "settings" section.
> > 
> > ## Best regards, Radu
> > 
> > [http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene
> > 
> > On Thu, Nov 8, 2012 at 6:21 PM, Rogerio Pereira  
> > [rogerio...@gmail.com](mailto:rogerio...@gmail.com) wrote:
> > 
> > > Is this the correct syntax for analysis section in a template file? I  
> > > tried  
> > > several way to configure analyzers, but nothing seens to work.
> > > 
> > > Em quinta-feira, 8 de novembro de 2012 13h43min12s UTC-2, Rogerio  
> > > Pereira  
> > > escreveu:
> > > 
> > > > Hi, I tried to configure the mappings and analyzers in several ways in  
> > > > my  
> > > > template, but nothing seens to be working:
> > > > 
> > > > Here's my configuration:
> > > > 
> > > > [https://gist.github.com/4039557](https://gist.github.com/4039557)
> > > > 
> > > > If it run:
> > > > 
> > > > curl -XGET localhost:9200/booksearch/\_mapping && echo  
> > > > or  
> > > > curl -XGET localhost:9200/booksearch/\_settings && echo
> > > > 
> > > > none of my custom settings are displayed.
> > > > 
> > > > Any ideas why?
> > > 
> > > --

--

---

<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:05am UTC](https://discuss.elastic.co/t/cant-get-template-working-with-mappings-and-analysis-defined/9632/6 "2017-07-06T03:05:02Z")

</div>


