# Elastic Search Phonetic issue with NEST in Dotnet (C#)

**URL:** <https://discuss.elastic.co/t/elastic-search-phonetic-issue-with-nest-in-dotnet-c/119759>\
**Category:** Elasticsearch\
**Created:** [February 14, 2018, 9:31am UTC](https://discuss.elastic.co/t/elastic-search-phonetic-issue-with-nest-in-dotnet-c/119759 "2018-02-14T09:31:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DotnetDeveloper](https://avatars.discourse-cdn.com/v4/letter/d/76d3ee/32.png) [@DotnetDeveloper](https://discuss.elastic.co/u/DotnetDeveloper)\
**Post date:** [February 14, 2018, 9:31am UTC](https://discuss.elastic.co/t/elastic-search-phonetic-issue-with-nest-in-dotnet-c/119759/1 "2018-02-14T09:31:57Z")

</div>

I am new in Elastic search and i want to use it for Phonetic search so I have added plugin NEST in dotnet (C#) using nougat package and also installed phonetic analysis plugin then tried to create index with phonetic but getting following error.

ServerError = {ServerError: 400Type: illegal\_argument\_exception Reason: "Unknown filter type [phonetic] for [my\_metaphone]"}

**Code :**

var result = client.CreateIndex("indexName", i =\> i  
.Settings(s =\> s  
.Analysis(a =\> a  
.Analyzers(x =\> x.Custom("my\_analyzer", ca =\> ca.Filters("standard", "lowercase", "my\_metaphone")))  
.TokenFilters(x =\> x.Phonetic("my\_metaphone", pf =\> pf.Encoder(PhoneticEncoder.DoubleMetaphone)))  
))  
.Mappings(m =\> m  
.Map(mm =\> mm  
.AutoMap()  
.Properties(p =\> p  
.Text(t =\> t  
.Name(n =\> n.Name)  
.Analyzer("my\_analyzer")  
.SearchAnalyzer("my\_analyzer")  
)  
)  
)  
)  
);

Can any one help me to create index with phonetic configuration in dotnet?  
I am able to create index with below json request.

**Code :**

PUT /indexname

{  
"settings": {  
"index": {  
"number\_of\_shards" : 4,  
"analysis": {  
"analyzer": {  
"my\_analyzer": {  
"tokenizer": "standard",  
"filter": ["standard","lowercase","my\_metaphone"]  
}  
},  
"filter": {  
"my\_metaphone": {  
"type": "phonetic",  
"encoder": "metaphone",  
"replace": false  
}  
}  
}  
}  
},  
"mappings":{  
"crm3":{  
"properties":{  
"@timestamp":{  
"type":"date"  
},  
"@version":{  
"type":"text",  
"fields":{  
"keyword":{  
"type":"keyword",  
"ignore\_above":256  
}  
}  
},  
"AccountCategory":{  
"type":"text",  
"fields":{  
"keyword":{  
"type":"keyword",  
"ignore\_above":256  
}  
}  
},  
"CityName":{  
"type":"text",  
"fields":{  
"keyword":{  
"type":"keyword",  
"ignore\_above":256  
}  
}  
},  
"ContactNumbers":{  
"type":"text",  
"fields":{  
"keyword":{  
"type":"keyword",  
"ignore\_above":256  
}  
}  
},  
"EmailIDs":{  
"type":"text",  
"fields":{  
"keyword":{  
"type":"keyword",  
"ignore\_above":256  
}  
}  
},  
"FirstName":{  
"type":"text",  
"analyzer": "my\_analyzer",  
"search\_analyzer": "my\_analyzer",  
"fields":{  
"keyword":{  
"type":"text"  
}  
}  
},  
"Gender":{  
"type":"text",  
"fields":{  
"keyword":{  
"type":"keyword",  
"ignore\_above":256  
}  
}  
},  
"IMSINumber":{  
"type":"text",  
"fields":{  
"keyword":{  
"type":"keyword",  
"ignore\_above":256  
}  
}  
},  
"IsBlackListed":{  
"type":"text",  
"fields":{  
"keyword":{  
"type":"keyword",  
"ignore\_above":256  
}  
}  
},  
"LastName":{  
"type":"text",  
"fields":{  
"keyword":{  
"type":"keyword",  
"ignore\_above":256  
}  
}  
},  
"MiddleName":{  
"type":"text",  
"fields":{  
"keyword":{  
"type":"keyword",  
"ignore\_above":256  
}  
}  
},  
"OrganizationName":{  
"type":"text",  
"fields":{  
"keyword":{  
"type":"keyword",  
"ignore\_above":256  
}  
}  
},  
"Segment":{  
"type":"text",  
"fields":{  
"keyword":{  
"type":"keyword",  
"ignore\_above":256  
}  
}  
},  
"SubscriberID":{  
"type":"text",  
"fields":{  
"keyword":{  
"type":"keyword",  
"ignore\_above":256  
}  
}  
},  
"SubscriberNo":{  
"type":"text",  
"fields":{  
"keyword":{  
"type":"keyword",  
"ignore\_above":256  
}  
}  
},  
"SubscriberTypeName":{  
"type":"text",  
"fields":{  
"keyword":{  
"type":"keyword",  
"ignore\_above":256  
}  
}  
},  
"path":{  
"type":"text",  
"fields":{  
"keyword":{  
"type":"keyword",  
"ignore\_above":256  
}  
}  
}  
}  
}  
}  
}

Using C# LINQ scenario, it's not working, Can any one guide for the same?  
Thanks in Advance,

---

<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:** [March 14, 2018, 9:32am UTC](https://discuss.elastic.co/t/elastic-search-phonetic-issue-with-nest-in-dotnet-c/119759/2 "2018-03-14T09:32:11Z")

</div>

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