elasticsearch 使用过程中经常遇到的问题

1. elasticsearch 报错 {"error":"Content-Type header [application/x-www-form-urlencoded] is not supported","status":406}

在 curl 后加入 -H "Content-Type: application/json;charset=UTF-8"

在postman heder 头中,

 

创建索引库: 

1)使用postman或curl这样的工具创建:
put http://localhost:9200/索引库名称

{
    "settings":{
        "index":{
            "number_of_shards":1,
            "number_of_replicas":0
        }
    }
}

参考:elasticsearch 局部更新

posted @ 2021-08-16 17:32  码农编程进阶笔记  阅读(363)  评论(0)    收藏  举报
返回顶部 有事您Q我