1 创建index,type : localhost:9200/get-together/group/1?pretty 然后跟上body:
{
"name": "Elasticsearch Denver",
"organizer": "Lee"
}
这样会自动创建index为get-together,type为group,并create一个文档。也可以采取直接创建index的方式: localhost:9200/new-index {"acknowledged":true}
2 查看index的mapping信息: localhost:9200/get-together/_mapping/group?pretty 你会看见如下信息
{ "get-together" : { "mappings" : { "group" : { "properties" : { "name" : { "type" : "string" }, "organizer" : { "type" : "string" } } } } } }