|---------------|---------------------|
| MySQL | ElasticSearch |
| 数据库(database) | 索引(index) |
| 数据表(table) | 类型(type) |
| 记录 | 文档(document,json格式) |
一、ES基础命令
1. ES cat查询命令
2. ES 保存文档
3. ES get查询操作
4. ES 更新操作
带_update:会与原数据进行比较,如果一样,则version、seq_no等字段不会增加。
5. ES 删除操作
6. ES bulk批量API
二、ES进阶检索命令
1. SearAPI


2. Query DSL
2.1 match_all

2.2. match匹配查询

2.3. match_phrase【短语匹配】
将整个短语进行匹配,不进行分词匹配

2.4. multi_match【多字段匹配】

2.5. boolean复合查询

2.6. term
term不会分词,match会分词

2.7 aggregations(执行聚合)


3. Mapping映射

3.1 创建映射


3.2 添加新的字段映射

3.3 更新映射

3.4 数据迁移



3.5 分词
