我将以下数据存储在文件xyz.json
中mycount="$E"; (( E > S )) && mycount="+$S"
howmany="$(( endline - startline + 1 ))"
tail -n "$mycount"| head -n "$howmany"
我想将其导入弹性搜索,我该怎么做?
答案 0 :(得分:0)
我在Elasticsearch文档中找到了以下文档,这有助于导入批量文档,我希望这会对您有所帮助
$ cat requests
{ "index" : { "_index" : "test", "_type" : "type1", "_id" : "1" } }
{ "field1" : "value1" }
$ curl -s -XPOST localhost:9200/_bulk --data-binary @requests; echo
{"took":7,"items":[{"create":{"_index":"test","_type":"type1","_id":"1","_version":1}}]}