A basic overview of node elasticsearch integration for searching
https://www.elastic.co/guide/en/elasticsearch/reference/current/brew.html
- Clone the repo in your workspace
- install the dependancies using
npm install
- set up
.env
file at a root level - run command
npm start
to start the server - run your elastic search server and change configuration at config/elasticsearch.js if applicable
-
to check if server is up curl --location --request GET 'http://localhost:3000/ping'
-
to check if elastic server is up or not curl --location --request GET 'http://localhost:3000/elastic/ping'
-
to refresh (delete if present + create) index curl --location --request POST 'http://localhost:3000/refresh'
--header 'Content-Type: application/json'
--data-raw '{ "indices": "tweets,user" }' -
to insert the data curl --location --request POST 'http://localhost:3000/insert'
-
for searching curl --location --request GET 'http://localhost:3000/search?keyword=sagar_vasa'