zoukankan      html  css  js  c++  java
  • ES建立索引步骤, 1,index 2.mapping 3,别名

    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

  • 相关阅读:
    ES6中的class的详解
    JavaSrcipt中字符串和数组容易搞混的操作
    ES6中的数据结构Map的理解和描述
    ES6中新增数据结构Set的理解和用法详情描述
    ES6中的Promise的用法总结
    JS中的async/await的用法和理解
    字节跳动、拼多多前端面经
    前端项目优化 -Web 开发常用优化方案、Vue & React 项目优化
    记几个 DOM 操作技巧
    JavaScript 面试题
  • 原文地址:https://www.cnblogs.com/zeenzhou/p/11588631.html
Copyright © 2011-2022 走看看