Elasticsearch provides a powerful API over http for accessing its features. In this lesson, you will be introduced to the API and learn how to use it to get data from Elasticsearch using the browser and the popular command curl. We will see how adding query stream parameters can exclude or include the properties that we desire from our data.
Setup is specified in the README.md
of the repository linked below.
Hello just an FYI, anyone that is using latest version of elastic he will need to update the npm packages as well.
Hi!
If you run the elasticsearch
and kibana
in the docker container you may have a trouble with importing data: http://elasticsearch:9200/_bulk => getaddrinfo ENOTFOUND elasticsearch elasticsearch:9200
. The solution for me was to change the ESCLUSTER
constant in the utils/import.js
to http://localhost:9200
Hello just an FYI, anyone that is using latest version of elastic he will need to update the npm packages as well.
As of 12/15/18, 14.2.0
worked for me.
I have been struggling to make the elastic search images with docker-compose...
anyways I am on Ubuntu 18.04 and the examples showed here are meant to work with elastic search 5
so if you use elastic search 6 the import.js
wont work you need to specify the API version to match your elastic search version.
the following will work if you have docker installed:
$ docker network create elastic
then run docker:
$ docker run -d --name elasticsearch --net elastic -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:5.6.14
in actions/import.js update the api version to 5.6
.
I hope this helps someone else.
diff --git a/package.json b/package.json index c79b341..64f25c5 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "index.js", "dependencies": { "csvtojson": "^1.1.0",
Can't edit previous comment - change "elasticsearch": "^15.4.1" in pacage json and apiVersion: '5.6' in imports.js if you have problems
All,
If you are stuck getting the GitHub repo to work with latest version of docker and Elastic Search etc. I have created a repo where I have updated dependencies and update docker references to the latest version and got it working.
https://github.com/vj-raghavan/elasticsearch-samples