查看es的健康狀態
http://10.1.18.37:8211/_cat/health?v
查看所有的索引
get http://10.1.18.37:8211/_cat/indices?v
創建索引,在postman執行的時候需要設置爲json數據格式
PUT /test_index?pretty
索引內容
{
"settings":{
"number_of_shards":3,
"number_of_replicas":1
},
"mappings":{
"properties":{
"word_count":{"type":"integer"},
"author":{"type":"keyword"},
"title":{"type":"text"},
"publish_date":{
"type":"date",
"format":"yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
}
}
}
}
一些說明
settings 設置
number_of_shards 分片數
number_of_replicas 副本數
mappings 結構化數據設置
mappings下面的一級屬性 是自定義的類型
properties 類型的屬性設置節點,下面都是屬性
epoch_millis表示時間戳