首页 > 移动平台 > 详细

44.mapping下的数据结构

时间:2018-02-25 18:46:50      阅读:237      评论:0      收藏:0      [点我收藏+]

主要知识点

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

}

}

}

}

}

}

}

}

44.mapping下的数据结构

原文:https://www.cnblogs.com/liuqianli/p/8469989.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!