# Create custom analyzer in index template

**URL:** <https://discuss.elastic.co/t/create-custom-analyzer-in-index-template/155637>\
**Category:** Elasticsearch\
**Created:** [November 7, 2018, 12:26am UTC](https://discuss.elastic.co/t/create-custom-analyzer-in-index-template/155637 "2018-11-07T00:26:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CamTheMan](https://avatars.discourse-cdn.com/v4/letter/c/3ec8ea/32.png) [@CamTheMan](https://discuss.elastic.co/u/CamTheMan)\
**Post date:** [November 7, 2018, 12:26am UTC](https://discuss.elastic.co/t/create-custom-analyzer-in-index-template/155637/1 "2018-11-07T00:26:20Z")

</div>

Hi All,

I am using Elastic as a logging system, and one of the optimizations I would like to make is changing the 'analyzer' ([https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-analyzers.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-analyzers.html)) for my 'host' field.

I would basically want the 'keyword' analyzer but to be case insensitive (lowercased, might be ok).

I suspect I'd need to write a 'custom' analyzer but I really have no idea how to go about this - is anyone able to help?

Thanks  
(elastic 6.4.2)

---

<div class="post-metadata">

**Author:** ![CamTheMan](https://avatars.discourse-cdn.com/v4/letter/c/3ec8ea/32.png) [@CamTheMan](https://discuss.elastic.co/u/CamTheMan)\
**Post date:** [November 19, 2018, 2:28am UTC](https://discuss.elastic.co/t/create-custom-analyzer-in-index-template/155637/2 "2018-11-19T02:28:19Z")

</div>

For anyone interested my full completed example is here: [Changing the analyzer type fields are no longer aggregatable](https://discuss.elastic.co/t/changing-the-analyzer-type-fields-are-no-longer-aggregatable/156554)

---

<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:** [December 17, 2018, 2:28am UTC](https://discuss.elastic.co/t/create-custom-analyzer-in-index-template/155637/3 "2018-12-17T02:28:20Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
