# How to use suggest in elasticsearch

**URL:** <https://discuss.elastic.co/t/how-to-use-suggest-in-elasticsearch/46762>\
**Category:** Elasticsearch\
**Created:** [April 8, 2016, 5:21am UTC](https://discuss.elastic.co/t/how-to-use-suggest-in-elasticsearch/46762 "2016-04-08T05:21:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![thanigaivelan19](https://avatars.discourse-cdn.com/v4/letter/t/90ced4/32.png) [@thanigaivelan19](https://discuss.elastic.co/u/thanigaivelan19)\
**Post date:** [April 8, 2016, 5:21am UTC](https://discuss.elastic.co/t/how-to-use-suggest-in-elasticsearch/46762/1 "2016-04-08T05:21:03Z")

</div>

Hi,

how to get the suggest in elastic search. Using curl post method and php.

when i search with first three letters it have to show the city start with three letter i had typed.

Below is my code

```
cities/city/_suggest?pretty=true&size=".$size."&from=".$from;
{
   "city-suggest":{
      "text":"atl",
      "term":{
         "field":"city"
      }
   }
}

```

Thanks

---

<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:01pm UTC](https://discuss.elastic.co/t/how-to-use-suggest-in-elasticsearch/46762/2 "2017-07-05T23:01:17Z")

</div>


