Elasticsearch 插入数据 PUT
Elasticsearch 大约 563 字插入数据
使用PUT方法
curl -X PUT "localhost:9200/megacorp/employee/1" -H 'Content-Type: application/json' -d'
{
"first_name" : "John",
"last_name" : "Smith",
"age" : 25,
"about" : "I love to go rock climbing",
"interests": [ "sports", "music" ]
}
'
返回:
{
"_index": "megacorp",
"_type": "employee",
"_id": "1",
"_version": 1,
"result": "created",
"_shards": {
"total": 2,
"successful": 1,
"failed": 0
},
"_seq_no": 0,
"_primary_term": 1
}
- megacorp:索引名称
- employee:类型名称
- 1:特定雇员的ID
阅读 2627 · 发布于 2019-04-25
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb扫描下方二维码关注公众号和小程序↓↓↓

昵称:
随便看看
换一批
-
移动端使用 Chrome 开发者工具调试网页阅读 1566
-
Golang JSON 的序列化和反序列化阅读 2925
-
Java 储存相同 key 的 map阅读 2704
-
package.json 中的依赖包版本号阅读 75
-
Java8 @FunctionalInterface 注解阅读 1386
-
Java WebSocket 获取 HttpSession阅读 2590
-
Windows 查看是否是固态硬盘阅读 1321
-
MySQL 时间相差了 13 小时阅读 2030
-
MySQL Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root阅读 3202
-
Elasticsearch 获取记录总数 _count阅读 10075