python 创建es mapping

import requests
def get_():
    url = "http://127.0.0.1:9200/indextest/_mapping?pretty"
    ss = requests.get(url)
    print(ss)
    print(ss.content)
    d = json.loads(ss.content)
    print(d)
    return d

def post():
    url = "http://127.0.0.1:9200/index/type/_mapping?pretty"
 
    res = requests.post(url, data=json.dumps(get_()["index"]["mappings"]), json=d)
    print(res)
    print(res.content)

python 创建es mapping

上一篇:linux,发布.netcore填坑,自动升级core版本后,运行报错:'Microsoft.AspNetCore.App', version '3.0.0' was not found.


下一篇:并发编程之Android中AsyncTask使用详解(四)