first commit

This commit is contained in:
iProbe 2022-10-18 16:59:37 +08:00
commit ba848e218d
1001 changed files with 152333 additions and 0 deletions

View file

@ -0,0 +1,20 @@
### 启动失败,报
```
[1] bootstrap checks failed
[1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
```
修改配置文件elasticsearch.yml文件至少一项配置放开即可discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes这里修改cluster.initial_master_nodes: : ["node-1"]
### 往es中写数据,报
```
curl -XPUT 127.0.0.1:9200/item/es/1?pretty -d '{"name": "wang", "age": 25}'
{
"error" : "Content-Type header [application/x-www-form-urlencoded] is not supported",
"status" : 406
}
```
写入数据时,加上-H 'content-Type:application/json' 即可,如下
```
curl -XPUT 127.0.0.1:9200/item/es/1?pretty -H 'content-Type:application/json' -d '{"name": "wang", "age": 25}'
```