zoukankan      html  css  js  c++  java
  • ES--Kibana相关操作创建索引和Mapping

    创建索引

    kibana 使用如下命令进行创建索引内容。

    PUT test_index/

    创建别名

    POST _aliases {
        "actions": [{
            "add": {
                "index": "test_index",
                "alias": "test_index_name"
            }
        }, {
            "add": {
                "index": "idx_internet_bar_entity",
                "alias": "test_index_name",
                "filter": {
                    "term": {
                        "team": "test_one"
                    }
                }
            }
        }]
    }

    创建Mapping

    POST test_index / test_type / _mapping {
        "test_type": {
            "dynamic": false,
            "_all": {
                "enabled": false
            },
            "properties": {
                "wbbh": {
                    "type": "keyword"
                },
                "jyxkzbh": {
                    "type": "keyword"
                },
                "wbmc": {
                    "type": "text",
                    "analyzer": "smartcn",
                    "fields": {
                        "raw": {
                            "type": "keyword"
                        },
                        "standard": {
                            "type": "text",
                            "analyzer": "standard"
                        }
                    }
                },
                "zbx": {
                    "type": "keyword"
                },
                "zby": {
                    "type": "keyword"
                },
                "zby_zbx": {
                    "type": "keyword"
                },
                "lksj": {
                    "type": "keyword"
                },
                "wbdz": {
                    "type": "text",
                    "analyzer": "smartcn",
                    "fields": {
                        "raw": {
                            "type": "keyword"
                        },
                        "standard": {
                            "type": "text",
                            "analyzer": "standard"
                        }
                    }
                },
                "cjsj": {
                    "type": "date"
                },
                "rksj": {
                    "type": "date"
                },
                "gxdwmc": {
                    "type": "text",
                    "analyzer": "smartcn",
                    "fields": {
                        "raw": {
                            "type": "keyword"
                        },
                        "standard": {
                            "type": "text",
                            "analyzer": "standard"
                        }
                    }
                },
                "wbfzr": {
                    "type": "text",
                    "analyzer": "smartcn",
                    "fields": {
                        "raw": {
                            "type": "keyword"
                        },
                        "standard": {
                            "type": "text",
                            "analyzer": "standard"
                        }
                    }
                },
                "dt": {
                    "type": "keyword"
                },
                "type": {
                    "type": "keyword"
                }
            }
        }
    }
  • 相关阅读:
    升级2010
    如何修改MSSQL的用户名
    减小delphi体积的方法
    Delphi调用大漠插件示例
    Delphi 7升级到XE2的字符串问题
    MSSQL 清空数据库中表的数据
    MSSQL 2008 密钥
    springboot 2.1.4 多数据源配置
    springboot 数据库连接 解决驼峰命名问题
    Flask 热更新
  • 原文地址:https://www.cnblogs.com/wpcnblog/p/11356194.html
Copyright © 2011-2022 走看看