Completion Suggester - Assign single token to input field?


(kumar raj) #1

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.


(kumar raj) #2

Can someone help me with this ?