# How to write match query in C# .net for phenetic search

**URL:** <https://discuss.elastic.co/t/how-to-write-match-query-in-c-net-for-phenetic-search/105306>\
**Category:** Elasticsearch\
**Created:** [October 25, 2017, 10:26pm UTC](https://discuss.elastic.co/t/how-to-write-match-query-in-c-net-for-phenetic-search/105306 "2017-10-25T22:26:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![timragon](https://avatars.discourse-cdn.com/v4/letter/t/3ab097/32.png) [@timragon](https://discuss.elastic.co/u/timragon)\
**Post date:** [October 25, 2017, 10:26pm UTC](https://discuss.elastic.co/t/how-to-write-match-query-in-c-net-for-phenetic-search/105306/1 "2017-10-25T22:26:38Z")

</div>

How do I write this query written in curl in C# .net code.

GET /disney2/character/\_search  
{  
"query": {  
"match": {  
"name.phonetic": {  
"query": "Jahnnie Smeeth",  
"operator": "and"  
}  
}  
}  
}

**Here is my index**

{  
"disney2": {  
"aliases": {},  
"mappings": {  
"character": {  
"properties": {  
"animated\_debut": {  
"type": "text",  
"fields": {  
"keyword": {  
"type": "keyword",  
"ignore\_above": 256  
}  
}  
},  
"name": {  
"type": "text",  
"fields": {  
"phonetic": {  
"type": "text",  
"analyzer": "dbl\_metaphone"  
}  
}  
},  
"original\_voice\_actor": {  
"type": "text",  
"fields": {  
"keyword": {  
"type": "keyword",  
"ignore\_above": 256  
}  
}  
}  
}  
}  
},  
"settings": {  
"index": {  
"number\_of\_shards": "5",  
"provided\_name": "disney2",  
"creation\_date": "1508968865802",  
"analysis": {  
"filter": {  
"dbl\_metaphone": {  
"type": "phonetic",  
"encoder": "double\_metaphone"  
}  
},  
"analyzer": {  
"dbl\_metaphone": {  
"filter": "dbl\_metaphone",  
"tokenizer": "standard"  
}  
}  
},  
"number\_of\_replicas": "1",  
"uuid": "9gLWi-i8Sjeo",  
"version": {  
"created": "5060199"  
}  
}  
}  
}  
}

---

<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:** [November 22, 2017, 10:26pm UTC](https://discuss.elastic.co/t/how-to-write-match-query-in-c-net-for-phenetic-search/105306/2 "2017-11-22T22:26:46Z")

</div>

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