# Got no results with phonetic plugin search

**URL:** <https://discuss.elastic.co/t/got-no-results-with-phonetic-plugin-search/46440>\
**Category:** Elasticsearch\
**Created:** [April 5, 2016, 6:00pm UTC](https://discuss.elastic.co/t/got-no-results-with-phonetic-plugin-search/46440 "2016-04-05T18:00:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![deveproject](https://avatars.discourse-cdn.com/v4/letter/d/b38774/32.png) [@deveproject](https://discuss.elastic.co/u/deveproject)\
**Post date:** [April 5, 2016, 6:00pm UTC](https://discuss.elastic.co/t/got-no-results-with-phonetic-plugin-search/46440/1 "2016-04-05T18:00:22Z")

</div>

**Elasticsearch version** : 1.5.2  
**Plugin jar** elasticsearch-analysis-phonetic-2.5.0.jar (properly installed through command line)  
**JVM version** : 1.8.0\_66  
**OS version** : Windows 7 Professional

**Description of the problem including expected versus actual behavior** :

Hi.  
I go through documentation  
[https://www.elastic.co/guide/en/elasticsearch/guide/1.x/phonetic-matching.html](https://www.elastic.co/guide/en/elasticsearch/guide/1.x/phonetic-matching.html)

The configuration requests were fine.

All the diagnosis requests with /my\_index/\_analyze?analyzer=dbl\_metaphone for

1. John Smith
2. Jonnie Smythe
3. Jahnnie Smeeth  
return the same list of tokens: JN, AN, SM0, XMT

For example  
POST [http://127.0.0.1:9201/my\_index/\_analyze?analyzer=dbl\_metaphone](http://127.0.0.1:9201/my_index/_analyze?analyzer=dbl_metaphone)  
Content-Type: application/json  
Jahnnie Smeeth  
-- response --  
200 OK  
Content-Type: application/json; charset=UTF-8  
Content-Length: 336

{"tokens":[{"token":"JN","start\_offset":0,"end\_offset":7,"type":"","position":1},{"token":"AN","start\_offset":0,"end\_offset":7,"type":"","position":1},{"token":"SM0","start\_offset":8,"end\_offset":14,"type":"","position":2},{"token":"XMT","start\_offset":8,"end\_offset":14,"type":"","position":2}]}

All the search requests with /my\_index/my\_type/\_search and above names returns no results.

POST [http://127.0.0.1:9201/my\_index/my\_type/\_search](http://127.0.0.1:9201/my_index/my_type/_search)  
Content-Type: application/json  
{  
"query": {  
"match": {  
"name.phonetic": {  
"query": "Jahnnie Smeeth",  
"operator": "and"  
}  
}  
}  
}  
-- response --  
200 OK  
Content-Type: application/json; charset=UTF-8  
Content-Length: 123

{"took":94,"timed\_out":false,"\_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":0,"max\_score":null,"hits":[]}}

No errors during launch and working in the logs.

I am not sure that it's a bug so decided to start from discussion.  
Am I miss something?  
Appreciate your help.

P.S.  
Notice that my port is 9201, your may be 9200. I also use POST http requests instead of GET by documentation.

---

<div class="post-metadata">

**Author:** ![deveproject](https://avatars.discourse-cdn.com/v4/letter/d/b38774/32.png) [@deveproject](https://discuss.elastic.co/u/deveproject)\
**Post date:** [April 5, 2016, 6:37pm UTC](https://discuss.elastic.co/t/got-no-results-with-phonetic-plugin-search/46440/2 "2016-04-05T18:37:04Z")

</div>

I have found where I was wrong.  
Sorry guys for your time but I missed mapping step

PUT /my\_index/\_mapping/my\_type  
{  
"properties": {  
"name": {  
"type": "string",  
"fields": {  
"phonetic": {  
"type": "string",  
"analyzer": "dbl\_metaphone"  
}  
}  
}  
}  
}

All works fine. Thank you for your job

---

<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:02pm UTC](https://discuss.elastic.co/t/got-no-results-with-phonetic-plugin-search/46440/3 "2017-07-05T23:02:10Z")

</div>


