Files
kratos-bootstrap/database/elasticsearch/README.md
2025-06-29 09:41:13 +08:00

33 lines
722 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ElasticSearch
## 概念对比
| ES存储结构 | RDBMS存储结构 |
|----------|-----------|
| Index | 表 |
| Document | 行 |
| Field | 表字段 |
| Mapping | 表结构定义 |
## mapping
- 动态映射dynamic mapping
- 显式映射explicit mapping
- 严格映射strict mappings
## Docker部署
```bash
docker pull bitnami/elasticsearch:latest
docker run -itd \
--name elasticsearch \
-p 9200:9200 \
-p 9300:9300 \
-e ELASTICSEARCH_USERNAME=elastic \
-e ELASTICSEARCH_PASSWORD=elastic \
-e ELASTICSEARCH_NODE_NAME=elasticsearch-node-1 \
-e ELASTICSEARCH_CLUSTER_NAME=elasticsearch-cluster \
bitnami/elasticsearch:latest
```