ES常用内置index
前言
个人总结了一些ES里面常用的index可以帮我们监控ES服务器状态,管理ES索引等,持续更新…
一、健康相关
| 索引 | 备注 |
|---|---|
| _cat/nodes | 查看服务器节点状态 |
| _cat/indices | 查看索引状态 |
| _cat/health | 查看集群状态 |
| /?pretty | 查看单节点信息 |
| _cluster/health (?level=indices) | 查看集群状态,添加level=indices可查看集群中索引状态 |
| _cluster/allocation/explain | 当集群为red时,可查看分片未分配的原因 |
二、索引操作相关
以test索引为例,mappings和settings为
{
"settings": {
// "refresh_interval": "-1" --禁止刷新会导致插入数据无法洛盘被查询到
"analysis" : {
"analyzer" : {
"ik" : {
"tokenizer" : "ik_max_word"
}
}
},
"number_of_shards" : 3,
"number_of_replicas" : 2
},
"mappings": {
"properties": {
"title": {
"type": "text",
"analyzer": "ik_max_word"
},
"status": {
"type": "short"
},
"updateTime": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
},
"modifiedTimeDay": {
"type": "keyword"
}
}
}
}'
| 索引 | 备注 |
|---|---|
| /test | 创建索引 curl -L -X PUT ‘http://localhost:9200/test’ |
| /test | 删除索引 curl -L -X DELETE ‘http://localhost:9200/test’ |
| test/_doc/1 | 查看索引状态 curl -L -X POST ‘http://localhost:9200/test/_doc/1’ |
| test/_doc/_search | 索引数据查询 curl -L -X POST ‘http://localhost:9210/information/_doc/_search’ |
| /_aliases | 此索引用于对别名的操作 |
| /test/_alias | 查看索引test的别名 |
| test/_mappings | 查看索引test的mappings |
| test/_settings | 查看索引test的settings |
| _cat/aliases/test | 查看别名test对应的真实索引 |
| /_analyze | 查看分词器的分词结果 |


被折叠的 条评论
为什么被折叠?



