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. codeforce 427 C. Checkposts(tarjan 强连通分量)

    题目链接:http://codeforces.com/contest/427/problem/C 题目大意是有n个junctions,这些junctions之间有m条道路,两两相连,现在在juncti ...

  2. Oracle expdp 多表导出处理

    一个项目中需要在oracle数据库某个用户下导出1000多个表,导入到测试库做数据分析测试.很少遇到需要导出这么多表的情况,通常都是按schema导出,或者整库导出.考虑到expdp中include参 ...

  3. Chrom Develop Extensions

    Chrome插件 Extensions are small software programs that customize the browsing experience. They enable ...

  4. m大子段和 hdu1024

    给出n个数,m个区间: 求选区m个区间的最大值: #include<cstdio> #include<algorithm> #include<math.h> #in ...

  5. php 接口获取公网ip并获取天气接口信息

    <?php function get_ip(){ //判断服务器是否允许$_SERVER if(isset($_SERVER)){ if(isset($_SERVER['HTTP_X_FORWA ...

  6. 解决linux乱码问题

    echo "LANG="zh_CN.UTF-8" >> /etc/sysconfig/i18n yum -y install kde-l10n-Chinese ...

  7. Jmeter中cookie自动存储

    1,新建一个测试计划,然后添加一个"HTTP Cookie 管理器"(用来存储cookie)2,新建一个线程组,添加一个Sampler-->“HTTP 请求”(用来登录用的) ...

  8. git拉取代码

    1,用sourcetree拉取的时候 遇到  fatal: repository 'http://gitlab.xxx.com/XXX/XXX.git/' not found 2,可以直接在要存放代码 ...

  9. Redis搭建一主一从及哨兵模式(二)

    废话不多说,直接进入正题. 一.主从搭建 进入redis的根目录,拷贝一份redis.conf,最初的一份留作模版: ①cp  redis.conf redis.conf.template ②vim ...

  10. Centos610无桌面安装VSFTP

    1.检查可以安装的VSFTP版本 yum search vsftp 2.开始安装VSFTP yum install -y vsftpd 3.配置说明 cd /etc/vsftpd vsftpd.con ...