zoukankan      html  css  js  c++  java
  • Elasticsearch学习笔记——索引模板

    在索引模板里面,date类型的字段的format支持多种类型,在es中全部会转换成long类型进行存储,参考

    https://zhuanlan.zhihu.com/p/34240906
    

    一个索引模板范例

    {
      "order": 0,
      "index_patterns": [
        "ssssssssssssssss_test*"
      ],
      "settings": {
        "index": {
          "codec": "best_compression",
          "routing": {
            "allocation": {
              "require": {
                "box_type": "master"
              },
              "total_shards_per_node": "3"
            }
          },
          "refresh_interval": "60s",
          "unassigned": {
            "node_left": {
              "delayed_timeout": "900m"
            }
          },
          "number_of_shards": "3",
          "number_of_replicas": "1"
        }
      },
      "mappings": {
        "_default_": {
          "_source": {
            "enabled": true
          },
          "dynamic_templates": [
            {
              "string_template": {
                "mapping": {
                  "type": "keyword"
                },
                "match_mapping_type": "string",
                "match": "*"
              }
            }
          ],
          "properties": {
            "a1": {
              "search_analyzer": "ik_max_word",
              "analyzer": "ik_max_word",
              "type": "text"
            },
            "a2": {
              "type": "float"
            },
            "a3": {
              "type": "integer"
            },
            "untitled": {
              "type": "float"
            },
            "a4": {
              "type": "long"
            },
            "a5": {
              "type": "double"
            },
            "a6": {
              "type": "ip"
            },
            "a8": {
              "type": "keyword"
            }
          },
          "_all": {
            "enabled": false
          }
        }
      },
      "aliases": {}
    }
    
  • 相关阅读:
    GUI起头
    最大公约数
    最小公倍数
    最大公约数、最小公倍数
    质数——筛选法
    质数——用已有质数求质数
    质数——6N±1法
    质数——1到n遍历法
    微服务的优势
    收到offer!
  • 原文地址:https://www.cnblogs.com/tonglin0325/p/11757803.html
Copyright © 2011-2022 走看看