// 查看所有索引
GET /_cat/indices?v
// 創建指定索引 customer
PUT /customer?pretty
// 查看指定索引信息 customer
GET /customer/
// 查看指定索引數據信息
GET /customer/_search
// 給指定索引添加指定的id數據信息
PUT /customer/external/1
{
"name": "John Doe"
}
// 查看指定索引的id 這裏查看id爲1的數據信息
GET /customer/external/1
// 刪除指定索引信息
DELETE /customer?pretty
// 創建指定索引
PUT /demo?pretty
// 查看指定索引信息
GET /demo
// 創建結構化索引
PUT /demo/main_info/_mappings
{
"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"
}
}
}
// 查看指定索引信息 此時可看到相應的結構化索引信息
GET /demo