zoukankan      html  css  js  c++  java
  • 44.mapping下的数据结构

    主要知识点

    1、了解es核心的数据类型

    2、了解es默认的mapping方式

    3、查看mapping

       

    1、核心的数据类型

       

    • string,text
    • byte
    • shortintegerlongfloatdouble
    • boolean
    • date

         

    2dynamic mapping

    这是es自带的(默认的mapping方式),在程序员未指定的情况下默认以这种方式进行mapping,

       

    true or false        -->        boolean

    123                -->        long

    123.45                -->        double

    2017-01-01        -->        date

    "hello world"        -->        string/text

       

    3、查看mapping

    语法:GET /index/_mapping/type

       

    实例: GET /test_index/_mapping/test_type

    结果如下

    {

    "test_index": {

    "mappings": {

    "test_type": {

    "properties": {

    "test_field": {

    "type": "text",

    "fields": {

    "keyword": {

    "type": "keyword",

    "ignore_above": 256

    }

    }

    },

    "test_field1": {

    "type": "text",

    "fields": {

    "keyword": {

    "type": "keyword",

    "ignore_above": 256

    }

    }

    },

    "test_field2": {

    "type": "text",

    "fields": {

    "keyword": {

    "type": "keyword",

    "ignore_above": 256

    }

    }

    }

    }

    }

    }

    }

    }

  • 相关阅读:
    beta冲刺总结-咸鱼
    咸鱼翻身beta冲刺博客集
    事后诸葛亮
    个人作业——软件产品案例分析
    Alpha冲刺博客集
    结对作业第二次
    项目需求分析(团队)
    第二次作业——个人项目实战
    软件工程实践第一次作业--准备
    beta冲刺总结
  • 原文地址:https://www.cnblogs.com/liuqianli/p/8469989.html
Copyright © 2011-2022 走看看