# Completion Suggester - Assign single token to input field?

**URL:** <https://discuss.elastic.co/t/completion-suggester-assign-single-token-to-input-field/158226>\
**Category:** Elasticsearch\
**Created:** [November 26, 2018, 5:18pm UTC](https://discuss.elastic.co/t/completion-suggester-assign-single-token-to-input-field/158226 "2018-11-26T17:18:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kumar3](https://avatars.discourse-cdn.com/v4/letter/k/ebca7d/32.png) [@kumar3](https://discuss.elastic.co/u/kumar3)\
**Post date:** [November 26, 2018, 5:18pm UTC](https://discuss.elastic.co/t/completion-suggester-assign-single-token-to-input-field/158226/1 "2018-11-26T17:18:59Z")

</div>

curl -X PUT localhost:9200/hotels/hotel/1 -d '  
{  
"name" : "Mercure Hotel Munich",  
"city" : "Munich",  
"name\_suggest" : {  
"input" : [  
"Mercure Hotel Munich",  
"Mercure Munich"  
]  
}  
}'

In the above example - There is a possibility to have many different ways user can search.  
If we have 100K documents of hotels - It's impossible to assign input fields for each document during mapping.

Is there any alternative that i can use - For instance - i can have a column in my DB for input field( input suggest). How can i assign input suggest field to input in mapping ?

Thank you.

---

<div class="post-metadata">

**Author:** ![kumar3](https://avatars.discourse-cdn.com/v4/letter/k/ebca7d/32.png) [@kumar3](https://discuss.elastic.co/u/kumar3)\
**Post date:** [November 27, 2018, 1:15pm UTC](https://discuss.elastic.co/t/completion-suggester-assign-single-token-to-input-field/158226/2 "2018-11-27T13:15:22Z")

</div>

Can someone help me with this ?

---

<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:** [December 25, 2018, 1:15pm UTC](https://discuss.elastic.co/t/completion-suggester-assign-single-token-to-input-field/158226/3 "2018-12-25T13:15:23Z")

</div>

Closed on December 25, 2018, 1:15pm UTC

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