创建es索引和mapping
第一种:
def set_mapping():
my_mapping = {
type_: {
"properties": {
"@timestamp": {
"type": "date"
},
"@version": {
"type": "keyword"
},
"channelSwitchDelay": {
"type": "long"
},
"frameDelay": {
"type": "long"
},
"host": {
"type": "keyword"
},
"iptvAccount": {
"type": "keyword"
创建es索引和mapping
最新推荐文章于 2024-08-10 14:40:29 发布
本文介绍了两种在Elasticsearch中创建索引和设置映射的方法。第一种通过Python操作,使用`es.indices.create()`和`es.indices.put_mapping()`函数;第二种采用curl命令,分别创建索引和设置映射,并提供了查看映射设置的命令。
摘要由CSDN通过智能技术生成