支持restful
http://ip:port/<索引>/<类型>/<文档id>
http动词: GET/PUT/POST/DELETE
索引的属性:粗框框就是分片,细框框是分片的备份
非结构化创建
结构化创建
一:head插件
book/novel/_mappings
{
"novel": {
"properties": {
"title": {
"type": "text"
}
}
}
}
二:postman:
url:localhost:9200/people
{
"settings": {
"number_of_shards": 3,
"number_of_replicas": 1
},
"mappings": {
"man": {
"properties": {
"name": {
"type": "text"
},
"country": {
"type": "keyword"
},
"age": {
"type": "integer"
},
"date": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss || yyyy-MM-dd || epoch_millis"
}
}
}
}
}
number_of_shards指分片数,number_of_replicas指备份数