我们可以使用JSON文件将数据上传到Elasticsearch [英] Do we can upload data into Elasticsearch using JSON file

查看:2377
本文介绍了我们可以使用JSON文件将数据上传到Elasticsearch的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Elasticsearch 的新手,我想知道我们是否可以使用 JSON 文件将数据传输到 Elasticsearch



请帮助我的过程,如果它在那里,我尝试做如下:

  curl -XGEThttp:// localhost:9200 / _bulk --databinary @ shakespeare.json

但是我收到一个错误无法连接到主机

解决方案
  curl -s -XPOSThttp:// localhost:9200 /< indexName> ; /< indexType> / _ bulk?pretty - 数据二进制@ shakespeare.json


I am new to Elasticsearch, I would like to know whether we can transfer data in to Elasticsearch using JSON file.

Please help me with the process if its there, I tried doing like below:

curl -XGET "http://localhost:9200/_bulk --databinary @shakespeare.json"

But I am getting an error "could not connect to host".

解决方案

Try below curl command.

curl -s -XPOST "http://localhost:9200/<indexName>/<indexType>/_bulk?pretty" --data-binary "@shakespeare.json"

这篇关于我们可以使用JSON文件将数据上传到Elasticsearch的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆