# Template for logstash for disable analyzer on string

**URL:** <https://discuss.elastic.co/t/template-for-logstash-for-disable-analyzer-on-string/12510>\
**Category:** Elasticsearch\
**Created:** [June 21, 2013, 12:39pm UTC](https://discuss.elastic.co/t/template-for-logstash-for-disable-analyzer-on-string/12510 "2013-06-21T12:39:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefano\_ruggiero](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@stefano\_ruggiero](https://discuss.elastic.co/u/stefano_ruggiero)\
**Post date:** [June 21, 2013, 12:39pm UTC](https://discuss.elastic.co/t/template-for-logstash-for-disable-analyzer-on-string/12510/1 "2013-06-21T12:39:58Z")

</div>

hi all i need some help about this template, i have to disable all  
analyzing process for my logstash logs beacuse i need to make a complete  
search without any split fields:

1. curl -XPUT '[http://localhost:9200/\_template/foo](http://localhost:9200/_template/foo)' -d '
2. {
3. "template" : "logstash-\*",
4. "mappings" : {
5. 

```
"_default_" : {

```

6. 

```
  "dynamic_templates" : [

```

7. 

```
    {

```

8. 

```
       "template_1" : {

```

9. 

```
       "path_match" : "@fields.*",

```

10. 

```
       "match_mapping_type" : "string",

```

11. 

```
       "mapping" : {

```

12. 

```
         "type" : "string",

```

13. 

```
         "index" : "not_analyzed"

```

14. 

```
       }

```

15. 

```
      }

```

16. 

```
     }

```

17. 

```
    ]

```

18. 

```
  }

```

19. 

```
}

```

20. }'

iam not able to understand what is wrong the behaviour of my search its  
the same with and without this template.

Thanks to all  
Regards.

--  
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:** ![stefano\_ruggiero](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@stefano\_ruggiero](https://discuss.elastic.co/u/stefano_ruggiero)\
**Post date:** [June 21, 2013, 5:08pm UTC](https://discuss.elastic.co/t/template-for-logstash-for-disable-analyzer-on-string/12510/2 "2013-06-21T17:08:00Z")

</div>

Il giorno venerdì 21 giugno 2013 14:39:58 UTC+2, [stefano...@gmail.com](mailto:stefano...@gmail.com) ha  
scritto:

> hi all i need some help about this template, i have to disable all  
> analyzing process for my logstash logs beacuse i need to make a complete  
> search without any split fields:
> 
> 1. curl -XPUT '[http://localhost:9200/\_template/foo](http://localhost:9200/_template/foo)' -d '
> 2. {
> 3. "template" : "logstash-\*",
> 4. "mappings" : {
> 5. 
> 
> ```
> "_default_" : {
> 
> ```
> 
> 6. 
> 
> ```
> "dynamic_templates" : [
> 
> ```
> 
> 7. 
> 
> ```
> {
> 
> ```
> 
> 8. 
> 
> ```
> "template_1" : {
> 
> ```
> 
> 9. 
> 
> ```
> "path_match" : "@fields.*",
> 
> ```
> 
> 10. 
> 
> ```
> "match_mapping_type" : "string",
> 
> ```
> 
> 11. 
> 
> ```
> "mapping" : {
> 
> ```
> 
> 12. 
> 
> ```
> "type" : "string",
> 
> ```
> 
> 13. 
> 
> ```
> "index" : "not_analyzed"
> 
> ```
> 
> 14. 
> 
> ```
> }
> 
> ```
> 
> 15. 
> 
> ```
> }
> 
> ```
> 
> 16. 
> 
> ```
> }
> 
> ```
> 
> 17. 
> 
> ```
> ]
> 
> ```
> 
> 18. 
> 
> ```
> }
> 
> ```
> 
> 19. 
> 
> ```
> }
> 
> ```
> 
> 20. }'
> 
> iam not able to understand what is wrong the behaviour of my search  
> its the same with and without this template.
> 
> Thanks to all  
> Regards.

ok i have fixed the usses by removing any indexes that was previus created!

--  
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:29am UTC](https://discuss.elastic.co/t/template-for-logstash-for-disable-analyzer-on-string/12510/3 "2017-07-06T02:29:57Z")

</div>


