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

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"
}
}
}
}
}

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