码迷,mamicode.com
首页 > Web开发 > 详细

Elasticsearch之curl创建索引

时间:2017-02-20 18:41:55      阅读:174      评论:0      收藏:0      [点我收藏+]

标签:dex   提示   name   创建   htm   strong   .com   index   src   

 

  前提,是

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创建索引

标签:dex   提示   name   创建   htm   strong   .com   index   src   

原文地址:http://www.cnblogs.com/zlslch/p/6420665.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!