# Mapping for suggester

**URL:** <https://discuss.elastic.co/t/mapping-for-suggester/44040>\
**Category:** Elasticsearch\
**Created:** [March 10, 2016, 1:42pm UTC](https://discuss.elastic.co/t/mapping-for-suggester/44040 "2016-03-10T13:42:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![akshat](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@akshat](https://discuss.elastic.co/u/akshat)\
**Post date:** [March 10, 2016, 1:42pm UTC](https://discuss.elastic.co/t/mapping-for-suggester/44040/1 "2016-03-10T13:42:04Z")

</div>

For term or phrase suggesters do I need to have appropriate mapping in place or would they work on a string field ? I tried this query on twitter example index and it created a document with id \_suggest. I had a user with title max which I was expecting to come. What am I doing wrong ?

curl -X POST 'localhost:9200/twitter/tweet/\_suggest?pretty' -d '{  
"user-suggest" : {  
"text" : "mix",  
"phrase" : {  
"field" : "user"  
}  
}  
}'  
{  
"\_index" : "twitter",  
"\_type" : "tweet",  
"\_id" : "\_suggest",  
"\_version" : 5,  
"\_shards" : {  
"total" : 2,  
"successful" : 1,  
"failed" : 0  
},  
"created" : false  
}

---

<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:09pm UTC](https://discuss.elastic.co/t/mapping-for-suggester/44040/2 "2017-07-05T23:09:30Z")

</div>


