I'm creating an autocomplete query for hotels and destinations. I want than when i type Can or Canc i see Cancun in the first results of my query. My php-code is the follow:
$params = [
'index' => ['hotels', 'destination_ngrams'],
'type' => ['hotel','city'],
"size" => 100 ,
'body' => [
'query' => [
'multi_match' => [
"type" => "best_fields",
"query" => $text,
"fields" => ["destination_name_*^3","hotel_name"],
"fuzziness" => "AUTO"
],
]
]
];
I already have a list of popular "citys and hotels" that i want to see first in my autocomplete.
Or, how can I give priority to destinations that start exactly with the same letters?
I think i can put a "relevance" value when I make the bulk code, but i don't be shure what way to follow
Anyone can help me?, i apresiate it alot!
Thanks!!