# Auto suggest on a static list of records

**URL:** <https://discuss.elastic.co/t/auto-suggest-on-a-static-list-of-records/11761>\
**Category:** Elasticsearch\
**Created:** [May 1, 2013, 2:05am UTC](https://discuss.elastic.co/t/auto-suggest-on-a-static-list-of-records/11761 "2013-05-01T02:05:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vineeth\_mohan](https://avatars.discourse-cdn.com/v4/letter/v/bc79bd/32.png) [@vineeth\_mohan](https://discuss.elastic.co/u/vineeth_mohan)\
**Post date:** [May 1, 2013, 2:05am UTC](https://discuss.elastic.co/t/auto-suggest-on-a-static-list-of-records/11761/1 "2013-05-01T02:05:59Z")

</div>

Hi ,

I have a simple use case of auto suggest and i am trying to build that  
using ES.

Basically i have the following mapping

_Companies_  
"Amazon INC" -\> "Amazon" , "AMZN" , "12345" , "RES33"  
"Amona INC" -\> "Amona" , "AMON" , "2345" , "RESss"  
"Yahoo INC" -\> "Yahoo" , "YHOO" , "3456" , "OKI876"  
"Google INC" -\> "Google" , "GOOG" , "3445" , "POO099"

_Region_  
"America" -\> "America" , "US"  
"India" -\> "India"  
"UK" -\> "Britain" , "UK"

So basically i have the above data. I need to map all the keywords on the  
left of the mapping to the right.

So , if i search for

query - AM

Result should be

{  
"Region" : ["America"],  
"Companies" : ["Amazon INC" , "Amona INC"]  
}

One main point to be noted is that

- For any search , there should be maximum of 10 results from each type  
(Like region or companies) and NOT total 10.

How can i achieve this using ES.

Thanks

```
        Vineeth

```

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 6, 2017, 2:38am UTC](https://discuss.elastic.co/t/auto-suggest-on-a-static-list-of-records/11761/2 "2017-07-06T02:38:56Z")

</div>

Closed on July 6, 2017, 2:38am UTC


