I want to make an autocomplete with elasticsearch
I have tried
- naive prefix matching,
- https://www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters-phrase.html
- http://davewalk.net/2015/04/13/address-autocomplete-in-go-and-elasticsearch-part-1.html
however all of them doesn't meet my expectation
suppose I have data like:
PHP Programing
php prado framework
OOP PHP Programming
PHPMyAdmin
PHP
Php
whenever I query PHP
, the result will be like above list ^
How to make PHP show first? instead of last
and how come PHP Programming has higher weight than PHP which is the equal to the query?
note: I already added lowercase filter so the query is treated as case-sensitive, which is why both php, Php, PHP
match the query