This Repo includes the sample doc to follow along with the tutorial: How to Build an Autocomplete Feature with Elasticsearch.
This is a data indexing program for demonstrating the autoSuggest API in elasticsearch. Find it here.
- The sample data with 1000 documents can be found in the file
- The code for indexing the documents is in the file
- The configuration details are in the
configs.jsfile. Here, we have details such as the elasticsearch host and port number configuration. In this file, by default, it is
localhost:9233. Please make sure to change it.
- First run the npm install to install the package.json contents.
- Now run node
runningHere.jsto run the program to index the sample data.