Elasticsearch插入数据PUT
Elasticsearch大约 562 字插入数据
使用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
阅读 755 · 发布于 2019-04-25
————        END        ————
扫描下方二维码关注公众号和小程序↓↓↓

昵称:
随便看看换一批
- PHP curl报错:SSL connect error阅读 794
- Oracle ORA-01502: index 'INDEX_NAME' or partition of such index is in unusable state阅读 129
- PHP序列化与反序列化阅读 391
- 设计模式之责任链模式阅读 356
- Windows10访问网页提示找不到服务器IP地址阅读 4744
- 不同平台文件格式:dos、unix、mac阅读 1460
- Linux tcpdump: no suitable device found阅读 63
- Linux之CentOS yum安装Redis阅读 382
- 不安装redis-server下连接redis阅读 516
- 走进Rust:异常处理阅读 234