Autocomplete example for elasticsearch
Steps:
- Configure elasticsearch
in config/elasticsearch.yml add the following
http.cors.enabled: true http.cors.allow-origin : "*" http.cors.allow-methods : OPTIONS, HEAD, GET, POST, PUT, DELETE http.cors.allow-headers : X-Requested-With,X-Auth-Token,Content-Type, Content-Length
Those are required to allow the demo webpage (demo.html) to access elasticsearch.
-
Install nodejs or python one of which will provide a simple webserver
-
Configure the index and the suggesters
#References:
http://jontai.me/blog/2013/02/adding-autocomplete-to-an-elasticsearch-search-application/