ElasticSearch笔记

# 系统

# 查看版本信息

GET /
1

# 索引

# 创建

PUT /index
{
  "settings": {
    "number_of_shards": 1,
    "number_of_replicas": 0
  }
}
1
2
3
4
5
6
7

# 删除

DELETE /index
1

# 查询

# 索引配置

GET /index
1

# 索引统计

GET _cat/indices
GET _cat/indices?h=index,store.size
GET _cat/indices?h=index,store.size,creation.date.string&index=sw*&format=json
GET _cat/indices/sw_*?h=index,store.size

1
2
3
4
5

# 文档

# 查询

GET /index/_search
{
  "query": {
    "match": {
      "field": "value"
    }
  }
}
1
2
3
4
5
6
7
8

# 索引别名

# 修改

POST /_aliases
{
  "actions": [
    {
      "add": {
        "index": "index1",
        "alias": "alias1"
      },
      "remove": {
        "index": "index2",
        "alias": "alias2"
      }
    }
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
上次更新: 2024/11/27, 13:48:55
最近更新
01
docker-compose笔记
01-12
02
MySQL数据迁移
11-27
03
Docker部署服务,避免PID=1
11-27
更多文章>