# Setting up an n-gram analyzer

**URL:** <https://discuss.elastic.co/t/setting-up-an-n-gram-analyzer/31313>\
**Category:** Elasticsearch\
**Created:** [September 29, 2015, 8:31am UTC](https://discuss.elastic.co/t/setting-up-an-n-gram-analyzer/31313 "2015-09-29T08:31:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![evvo](https://avatars.discourse-cdn.com/v4/letter/e/dfb087/32.png) [@evvo](https://discuss.elastic.co/u/evvo)\
**Post date:** [September 29, 2015, 8:31am UTC](https://discuss.elastic.co/t/setting-up-an-n-gram-analyzer/31313/1 "2015-09-29T08:31:18Z")

</div>

hi

im wanting to include a bigram option within my index for searching on...

i realise i need to add this at the point of indexing but am not sure how... heres my existing index create

clientTEST.CreateIndex(c =\> c  
.Index("testcontent")  
.InitializeUsing(indexSettings)  
.AddMapping(m =\> m  
.MapFromAttributes()  
.IndexAnalyzer("english")  
.SearchAnalyzer("english"))  
);

do i create another .AddMapping area and how do i create the analyzer and analysis section . ive found examples using JSON but not sure how to translate into the NEST syntax...

---

<div class="post-metadata">

**Author:** ![softwaredoug](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/softwaredoug/32/22681_2.png) [@softwaredoug](https://discuss.elastic.co/u/softwaredoug)\
**Post date:** [September 29, 2015, 8:54am UTC](https://discuss.elastic.co/t/setting-up-an-n-gram-analyzer/31313/2 "2015-09-29T08:54:57Z")

</div>

This stackoverflow question seems to translate it to the NEST syntax

> <https://stackoverflow.com/questions/25193800/creating-a-custom-analyzer-in-elasticsearch-nest-client>

---

<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 5, 2017, 11:47pm UTC](https://discuss.elastic.co/t/setting-up-an-n-gram-analyzer/31313/3 "2017-07-05T23:47:38Z")

</div>


