第一种
URL http://127.0.0.1:9200/block3/hellozz/_mappings
METHOD POST/PUT
{
"hellozz":{
"properties":{
"id":{
"type":"long",
"store":true
},
"title":{
"type":"text",
"store":true,
"index":true,
"analyzer":"standard"
},
"content":{
"type":"text",
"store":true,
"index":true,
"analyzer":"standard"
}
}
}
}
第二种
URL http://127.0.0.1:9200/block5
METHOD PUT
{
"mappings":{
"artilce":{
"properties":{
"id":{
"type":"long",
"store":true
},
"title":{
"type":"text",
"store":true,
"index":true,
"analyzer":"standard"
},
"content":{
"type":"text",
"store":true,
"index":true,
"analyzer":"standard"
}
}
}
}
}
版本信息
{
"name" : "xXegBfS",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "MujpKTbnQymEjBO5uXgPew",
"version" : {
"number" : "5.6.8",
"build_hash" : "688ecce",
"build_date" : "2018-02-16T16:46:30.010Z",
"build_snapshot" : false,
"lucene_version" : "6.6.1"
},
"tagline" : "You Know, for Search"
}