1.建立索引
PUT /index_trans_detail

2.建立mapping
POST /index_trans_detail/type_trans_detail/_mapping
{
"type_trans_detail": {
"properties": {
"id": {
"type": "long"
},
"entId": {
"type": "long"
},
"orgId": {
"type": "long"
},
"seqno": {
"type": "text",
"fielddata": true
},
"transDate": {
"type": "date",
"format": "yyyy-MM-dd"
},
"postTatus": {
"type": "integer"
},
"ioFlag": {
"type": "integer"
},
"depotId": {
"type": "long"
},
"depotCode": {
"type": "keyword"
},
"depotName": {
"type": "text"
},
"depotClassId": {
"type": "long"
},
"depotClassCode": {
"type": "keyword"
},
"depotClassName": {
"type": "text"
},
"orgOrgId": {
"type": "long"
},
"orgOrgCode": {
"type": "keyword"
},
"orgOrgName": {
"type": "text"
},
"orgOrgClassId": {
"type": "long"
},
"orgOrgClassCode": {
"type": "keyword"
},
"orgOrgClassName": {
"type": "text"
},
"balOrgId": {
"type": "long"
},
"balOrgCode": {
"type": "keyword"
},
"balOrgName": {
"type": "text"
},
"transOrgId": {
"type": "long"
},
"transOrgCode": {
"type": "keyword"
},
"transOrgName": {
"type": "text"
},
"transOrgClassId": {
"type": "long"
},
"transOrgClassCode": {
"type": "keyword"
},
"transOrgClassName": {
"type": "text"
},
"transBalOrgId": {
"type": "long"
},
"transBalOrgCode": {
"type": "keyword"
},
"transBalOrgName": {
"type": "text"
},
"transTypeId": {
"type": "long"
},
"transType": {
"type": "keyword"
},
"transName": {
"type": "text"
},
"dutyBillId": {
"type": "long"
},
"dutyBillType": {
"type": "integer"
},
"dutyBillNo": {
"type": "text",
"fielddata": true
},
"sourceId": {
"type": "long"
},
"sourceType": {
"type": "integer"
},
"sourceNo": {
"type": "keyword"
},
"billStatus": {
"type": "integer"
},
"headRemark": {
"type": "text"
},
"isAllowDel": {
"type": "integer"
},
"useOrgId": {
"type": "long"
},
"headIoQty": {
"type": "double"
},
"headIoAmt": {
"type": "double"
},
"headIoCostAmt": {
"type": "double"
},
"periodNo": {
"type": "text"
},
"externalBillNo": {
"type": "text"
},
"externalSysType": {
"type": "integer"
},
"useDepId": {
"type": "long"
},
"useDepCode": {
"type": "keyword"
},
"useDepName": {
"type": "text"
},
"usePurpose": {
"type": "integer"
},
"transId": {
"type": "long"
},
"goodsId": {
"type": "long"
},
"goodsCode": {
"type": "keyword"
},
"goodsName": {
"type": "text"
},
"goodsClassId": {
"type": "long"
},
"goodsClassCode": {
"type": "keyword"
},
"goodsClassName": {
"type": "text"
},
"goodsSpec": {
"type": "keyword"
},
"goodsOrigin": {
"type": "text"
},
"postFlag": {
"type": "integer"
},
"goodsWeight": {
"type": "double"
},
"ioQty": {
"type": "double"
},
"ioPrice": {
"type": "double"
},
"ioAmt": {
"type": "double"
},
"unitId": {
"type": "long"
},
"unitName": {
"type": "text"
},
"unitRate": {
"type": "double"
},
"iocostPrice": {
"type": "double"
},
"ioCostAmt": {
"type": "long"
},
"feeAmt": {
"type": "long"
},
"lotId": {
"type": "long"
},
"dutyBillDetailId": {
"type": "long"
},
"sourceDetailId": {
"type": "long"
},
"dutyOrgId": {
"type": "long"
},
"postUserId": {
"type": "long"
},
"postDateTime": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss"
},
"postReturnId": {
"type": "long"
},
"errMsg": {
"type": "text"
},
"firstPostDatetime": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss"
},
"balanceFlag": {
"type": "integer"
},
"remark": {
"type": "text"
},
"baseQty": {
"type": "double"
},
"baseUnitId": {
"type": "long"
},
"baseUnitName": {
"type": "text"
},
"baseUnitPrice": {
"type": "double"
},
"createType": {
"type": "integer"
},
"createHeadId": {
"type": "long"
},
"invUnitId": {
"type": "long"
},
"invUnitCode": {
"type": "keyword"
},
"invUnitName": {
"type": "text"
},
"invUnitRate": {
"type": "double"
},
"invQty": {
"type": "double"
},
"invCostPrice": {
"type": "double"
},
"discountRate": {
"type": "double"
},
"discountTaxRate": {
"type": "double"
},
"taxRate": {
"type": "double"
},
"taxAmt": {
"type": "double"
},
"ioBillStatus": {
"type": "integer"
},
"ioBillTime": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss"
},
"ioBillQty": {
"type": "double"
},
"taxType": {
"type": "integer"
},
"isStoBackPrice": {
"type": "integer"
},
"stoCostPrice": {
"type": "double"
},
"stoCostAmt": {
"type": "double"
},
"version": {
"type": "integer"
},
"deleted": {
"type": "long"
},
"creatorCode": {
"type": "keyword"
},
"creatorName": {
"type": "text",
"fielddata": true
},
"createdAt": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss"
},
"creatorOrgCode": {
"type": "keyword",
"index": false
},
"modifierCode": {
"type": "keyword",
"index": false
},
"modifierName": {
"type": "text"
},
"lastModifiedAt": {
"type": "date",
"format": "yyyy-MM-dd HH:mm:ss"
},
"modifierOrgCode": {
"type": "keyword",
"index": false
},
"invTransHeadId": {
"type": "long"
},
"handledOrgCode": {
"type": "keyword"
},
"handledOrgName": {
"type": "text"
},
"createdAtTimestamp": {
"type": "date",
"format": "epoch_millis"
},
"transDateTimestamp": {
"type": "date",
"format": "epoch_millis"
},
"lastModifiedTimestamp": {
"type": "date",
"format": "epoch_millis"
},
"postDateTimeTimestamp": {
"type": "date",
"format": "epoch_millis"
},
"ioBillTimeTimestamp": {
"type": "date",
"format": "epoch_millis"
},
"firstPostDatetimeTimestamp": {
"type": "date",
"format": "epoch_millis"
}
}
}
}

3.建立别名
PUT /index_trans_detail/_alias/index_trans_detail_alias

ES建立索引步骤, 1,index 2.mapping 3,别名的更多相关文章

  1. Es创建索引、设置和修改Mapping

    Http接口操作示例如下: 1.创建索引: 2.删除索引: 3.创建mapping: 4.查看mapping:

  2. elasticsearch index 之 Mapping

    Lucene索引的一个特点就filed,索引以field组合.这一特点为索引和搜索提供了很大的灵活性.elasticsearch则在Lucene的基础上更近一步,它可以是 no scheme.实现这一 ...

  3. 使用Elasticsearch-jdbc为MySQL数据库建立索引

    elasticsearch-jdbc 环境 Ubuntu 14.04 JDK 1.8.0_66 Elasticsearch 2.3.1 Elasticsearch-jdbc 2.3.1.0 Elast ...

  4. Spark2.2+ES6.4.2(三十二):ES API之index的create/update/delete/open/close(创建index时设置setting,并创建index后根据avro模板动态设置index的mapping)

    要想通过ES API对es的操作,必须获取到TransportClient对象,让后根据TransportClient获取到IndicesAdminClient对象后,方可以根据IndicesAdmi ...

  5. mongodb 建立索引提示异常:WiredTigerIndex::insert: key too large to index, failing 1483

    { "ok" : 0.0, "errmsg" : "WiredTigerIndex::insert: key too large to index, ...

  6. FOREIGN KEY 外键约束; UNIQUE和PRIMARY KEY 主键约束、CREATE INDEX建立索引的使用

    1)foreign key 是个约束,意思是说如果你给A字段设置了外键约束,以后你要往A字段插入数据,这个数据一定是要在foreign key 后面跟的那个字段中存在的值.这个的意义就是约束了数据的完 ...

  7. es字符串字段类型的私有属性 建立索引的分析器 用于查询的分析器 短语查询优化

    除了公共属性外,基于字符串的字段还有私有属性 term_vector  是否计算该字段的Lucene词向量term vector no  默认值 yes with_offsets with_posit ...

  8. 「Elasticsearch」ES重建索引怎么才能做到数据无缝迁移呢?

    背景 众所周知,Elasticsearch是⼀个实时的分布式搜索引擎,为⽤户提供搜索服务.当我们决定存储某种数据,在创建索引的时候就需要将数据结构,即Mapping确定下来,于此同时索引的设定和很多固 ...

  9. Oracle索引梳理系列(五)- Oracle索引种类之表簇索引(cluster index)

    版权声明:本文发布于http://www.cnblogs.com/yumiko/,版权由Yumiko_sunny所有,欢迎转载.转载时,请在文章明显位置注明原文链接.若在未经作者同意的情况下,将本文内 ...

随机推荐

  1. noobSTL-1-配置器-0

    noobSTL-1-配置器-0 0.前言 STL的配置器(allocator),也叫内存分配器,负责空间配置与管理,简单地说,就是负责管理内存的. 从实现的角度来看,配置器是一个实现了动态空间配置.空 ...

  2. docker删除镜像时报错解决办法

    报错信息 [root@kvm ~]# docker rmi 4950a54ede5a Error response from daemon: conflict: unable to delete 49 ...

  3. UltraEdit设置打开的文件类型,怎么打开大文本文件

    点击高级,配置,选择文件处理下的临时文件,设置如图即可打开超大文本文件. 补充:视图——显示行号.

  4. 如何开通linux机器的对外访问端口

    1.先查看是否已经开通 2.没有开通,去linux机器查看防火墙,确实没有开通 3.修改防火墙 vim /etc/sysconfig/iptables 4.重启防火墙之后重新查看已经可以看到8000端 ...

  5. android如何让checkbox实现互斥以及android验证端cession登录注意事项

    1.CheckBox有一个监听器OnChangedListener,每次选择checkbox都会触发这个事件, 里边有一个参数isChecked,就是判断checkbox是否已经选上了的,可以在这判断 ...

  6. drf-jwt手动签发与校验,drf小组件:过滤、筛选、排序、分页

    复习 """ 频率组件:限制接口的访问频率 源码分析:初始化方法.判断是否有权限方法.计数等待时间方法 自定义频率组件: class MyThrottle(SimpleR ...

  7. [蓝桥杯][基础训练]Huffuman树

    Description Huffman树在编码中有着广泛的应用.在这里,我们只关心Huffman树的构造过程. , p1, …, pn-1},用这列数构造Huffman树的过程如下:1. 找到{pi} ...

  8. iOS 自动化打包发布(Fastlane+ Jenkins+蒲公英)

    安装 Xcode 命令行工具:xcode-select --install 安装 fastlane:sudo gem install fastlane --verbose 安装成功后查看版本:fast ...

  9. Django框架之ORM的相关操作(二)

    模型类: class Commongity(models.Model): id=models.AutoField(primary_key=True) name=models.CharField(max ...

  10. 一张linux光盘查看是哪个版本号的方法

    在此查看版本号,方法如下:打开光盘,查找rpm包中的release,就是版本号.