首页 > 代码库 > Elasticsearch之curl创建索引
Elasticsearch之curl创建索引
前提,是
Elasticsearch之curl创建索引库
[hadoop@djt002 elasticsearch-2.4.3]$ curl -XPUT ‘http://192.168.80.200:9200/zhouls/emp/1‘ -d‘{"name":"tom","age":25}‘
{"_index":"zhouls","_type":"emp","_id":"1","_version":1,"_shards":{"total":2,"successful":1,"failed":0},"created":true}[hadoop@djt002 elasticsearch-2.4.3]$
即,"_index":"zhouls",是索引库是zhouls
"_type":"emp",是类型是emp
"_id":"1",是id是1
"_version":1,是版本是1
"_shards":{"total":2,"successful":1,"failed":0},是
"created":true,是创建索引提示成功!
含义:
zhouls,代表是索引库
emp代表类型,员工的意思
1代表id,
Elasticsearch之curl创建索引
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。