zoukankan      html  css  js  c++  java
  • es 常用DSL

    GET /_cat/indices?v


    GET /inv_trans_detail/_alias/*

    GET /inv_trans_detail/_search
    {
    "query": {
    "bool": {
    "filter": [
    {
    "term": {
    "goodsClassCode": {
    "value": "801"
    }
    }},
    {
    "term": {
    "goodsClassName": {
    "value": "健康卡"
    }
    }
    }
    ]
    }

    }
    }


    POST /pur_transfer_detail/_mapping/goods
    {
    "goods": {
    "properties": {
    "headPlanRecDate": {
    "type": "date",
    "format": "yyyy-MM-dd HH:mm:ss"
    }
    }
    }
    }


    POST /sal_consign_out_detail/goods/6489204/_update
    {
    "doc": {
    "failStatus": 0
    }
    }

    POST /sal_consign_out_detail/goods/8135734/_update
    {
    "doc": {
    "deleted": 8135734
    }
    }


    GET /sal_order_detail/_search
    {
    "query": {
    "term": {
    "seqno": {
    "value": "BGYSLOR20200612022864"
    }
    }
    },
    "from": 0,
    "size": 10
    }

    GET /inv_stock_daily/_search
    {
    "query": {
    "bool": {
    "filter": [
    {
    "term": {
    "goodsCode": {
    "value": "101011"
    }
    }},
    {
    "term": {
    "depotCode": {
    "value": "0001"
    }
    }
    }
    ]
    }
    }
    }

    GET /sal_order_detail/_search
    {
    "query": {
    "bool": {
    "filter": [
    {
    "term": {
    "deleted": {
    "value": 0,
    "boost": 1
    }
    }
    },

    {
    "term": {
    "dualOrgCode": "szpszx"
    }
    },
    {
    "term": {
    "orderType": "1"
    }
    },

    {
    "term": {
    "goodsCode": "100041"
    }
    },
    {
    "range": {
    "preArrivalDate": {
    "from": "2019-12-05",
    "to": "2019-12-05",
    "include_lower": true,
    "include_upper": true,
    "boost": 1
    }
    }
    }


    ]
    }
    },
    "aggs": {
    "dateAgg": {
    "sum": {
    "field": "requestQty"
    }
    }
    }
    ,"size": 224
    ,"_source": "{id}"

    }

    GET /pur_transfer_detail/_mapping


    GET /inv_trans_detail/goods/_search
    {
    "size": 10,
    "query": {
    "bool": {
    "filter": [
    {
    "term": {
    "deleted": {
    "value": "0"
    }
    }},
    {
    "term": {
    "postFlag": {
    "value": "1"
    }
    }},
    {
    "term": {
    "transType": {
    "value": "$SAL"
    }
    }},
    {
    "term": {
    "orgOrgCode": {
    "value": "gylhnc"
    }
    }
    },{
    "term": {
    "goodsCode": {
    "value": "500423"
    }
    }
    },
    {
    "range": {
    "transDate": {
    "from": "2020-03-28",
    "to": "2020-05-24",
    "include_lower": true,
    "include_upper": true,
    "boost": 1
    }
    }
    }
    ]
    }

    },

    "aggs": {
    "dateAgg": {
    "sum": {
    "field": "ioAmt"
    }
    }
    }
    ,
    "_source": {"includes": [
    "id","ioQty","goodsName","goodsCode"
    ],
    "excludes": []}
    }


    GET /sal_consign_out_detail/goods/_search
    {
    "size": 216,
    "query": {
    "bool": {
    "filter": [
    {
    "term": {
    "deleted": {
    "value": "0"
    }
    }},
    {
    "term": {
    "entId": {
    "value": "1"
    }
    }},
    {
    "term": {
    "failStatus": {
    "value": 70
    }
    }}
    ,
    {
    "term": {
    "goodsCode": {
    "value": "108372"
    }
    }}
    ,
    {
    "term": {
    "conOrgCode": {
    "value": "fzpszx"
    }
    }
    },
    {
    "range": {
    "preArrivalDate": {
    "from": "2020-03-21",
    "to": "2020-04-01",
    "include_lower": true,
    "include_upper": true,
    "boost": 1
    }
    }
    }
    ]
    }

    },

    "aggs": {
    "dateAgg": {
    "sum": {
    "field": "shippedQty"
    }
    }
    }
    ,
    "_source": {"includes": [
    "seqno"
    ],
    "excludes": []}
    }


    GET /sal_consign_out_detail/_search
    {
    "query": {
    "bool": {
    "filter": [
    {
    "term": {
    "deleted": {
    "value": 0,
    "boost": 1
    }
    }
    },
    {
    "term": {
    "conOrgCode": "xscnjc"
    }
    },
    {
    "term": {
    "failStatus": 70
    }
    },
    {
    "term": {
    "goodsCode": "663817"
    }
    },
    {
    "range": {
    "preArrivalDate": {
    "from": "2020-03-01",
    "to": "2020-03-27",
    "include_lower": true,
    "include_upper": true,
    "boost": 1
    }
    }
    }
    ]
    }
    },
    "aggs": {
    "dateAgg": {
    "sum": {
    "field": "shippedQty"
    }
    }
    },
    "size": 30,
    "_source": {
    "includes": [
    "s"
    ],
    "excludes": []
    }
    }

    GET /sal_order_detail/goods/_search
    {
    "size": 1,
    "query": {
    "constant_score": {
    "filter": {
    "term": {
    "dualOrgCode": "szpszx"
    }
    }
    }
    },
    "aggs": {
    "type": {
    "terms": {
    "field": "orgOrgId"
    },
    "aggs": {
    "is_out": {
    "terms": {
    "field": "goodsCode"
    },
    "aggs": {
    "totalNum": {
    "sum": {
    "field": "ioQty"
    }
    },
    "totolAmt": {
    "sum": {
    "field": "ioAmt"
    }
    }
    }
    }
    }
    }
    }
    }

    GET /inv_stock_daily_alias/_search
    {
    "query": {
    "term": {
    "id": {
    "value": "812834883"
    }
    }
    }
    , "from": 0,
    "size": 20
    }

    GET /sal_consign_out_detail/_search
    {
    "query": {
    "term": {
    "id": {
    "value": 18366042
    }
    }
    }
    , "from": 0,
    "size": 20
    }

    GET /bas_goods_unit/_search
    {
    "query": {

    "range": {
    "createdAt": {
    "from": "2019-12-28 00:00:00"
    }
    }
    }
    , "from": 0,
    "size": 0
    }

    GET /inv_trans_detail/_search
    {
    "query": {

    "range": {
    "createdAt": {
    "from": "2020-06-01 00:00:00",
    "to": "2020-06-20 23:59:59"
    }
    }
    }
    , "from": 0,
    "size": 0,
    "_source": "{field}"
    }

    GET /inv_stock_detail/_search
    {
    "query": {

    "range": {
    "createdAt": {
    "from": "2000-03-01 00:00:00",
    "to": "2022-12-01 23:59:59"
    }
    }
    }
    , "from": 0,
    "size": 0,
    "_source": "{field}"
    }

    GET /sal_order_detail/_search
    {
    "query": {

    "range": {
    "createdAt": {
    "from": "2020-06-15 00:00:00",
    "to": "2020-06-15 23:59:59"
    }
    }
    }
    , "from": 0,
    "size": 0,
    "_source": "{field}"
    }

    GET /sal_consign_detail/_search
    {
    "query": {

    "range": {
    "createdAt": {
    "from": "2020-04-01 00:00:00",
    "to": "2020-04-03 23:59:59"
    }
    }
    }
    , "from": 0,
    "size": 0,
    "_source": "{field}"
    }


    GET /sal_consign_out_detail/_search
    {
    "query": {

    "range": {
    "createdAt": {
    "from": "2020-06-15 00:00:00",
    "to": "2020-06-15 23:59:59"
    }
    }
    }
    , "from": 0,
    "size": 0,
    "_source": "{field}"
    }


    GET /sal_pre_order_detail/_search
    {
    "query": {

    "range": {
    "createdAt": {
    "from": "2020-04-01 00:00:00",
    "to": "2020-04-03 23:59:59"
    }
    }
    }
    , "from": 0,
    "size": 0,
    "_source": "{field}"
    }

    GET /sal_consign_return_detail/_search
    {
    "query": {

    "range": {
    "createdAt": {
    "from": "2020-04-01 00:00:00",
    "to": "2020-04-03 23:59:59"
    }
    }
    }
    , "from": 0,
    "size": 0,
    "_source": "{field}"
    }

    GET /sal_daily_trans_expense/_search
    {
    "query": {

    "range": {
    "createdAt": {
    "from": "2020-04-01 00:00:00",
    "to": "2020-04-03 23:59:59"
    }
    }
    }
    , "from": 0,
    "size": 0,
    "_source": "{field}"
    }

    GET /sal_daily_other_expense/_search
    {
    "query": {

    "range": {
    "createdAt": {
    "from": "2020-04-01 00:00:00",
    "to": "2020-04-03 23:59:59"
    }
    }
    }
    , "from": 0,
    "size": 0,
    "_source": "{field}"
    }

    GET /inv_stock_daily/_search
    {
    "query": {

    "range": {
    "stockDate": {
    "from": "2021-02-01",
    "to": "2021-04-28"
    }
    }
    }
    , "from": 0,
    "size": 0,
    "_source": "{field}"
    }

    GET /inv_stock_detail/_mapping


    GET /sal_consign_out_detail/_search
    {
    "query": {
    "bool": {
    "filter": [
    {
    "term": {
    "conOrgCode": {
    "value": "hfpszx"
    }
    }
    },{
    "term": {
    "failStatus": {
    "value": 70
    }
    }
    },
    {
    "range": {
    "preArrivalDate": {
    "from": "2020-04-01",
    "to": "2020-04-03"
    }
    }
    }
    ]
    }
    }
    , "from": 0,
    "size": 100
    }


    GET /pur_transfer_detail/_search
    {
    "query": {

    "term": {
    "id": {
    "value": "11834"
    }
    }
    }
    , "from": 0,
    "size": 10
    }


    PUT /inv_stock_daily_202011/_alias/inv_stock_daily_alias

    POST /_reindex
    {
    "source": {
    "index": "inv_stock_detail",

    "size": 5000

    },
    "dest": {
    "index": "inv_stock_detail_bak"
    }
    }


    GET _cat/nodeattrs?v&h=node,attr,value&s=attr:desc

    GET _cat/shards/inv_stock_daily_alias?v&h=index,shard,prirep,node&s=node

    PUT hot_warm_test_index/_settings
    {
    "index.routing.allocation.require.temperature": "hot"
    }


    PUT hot_warm_test_index/_settings
    {
    "index.routing.allocation.require.temperature": "warm"
    }

    PUT /inv_stock_daily_202007/_alias/inv_stock_daily_alias


    PUT /inv_stock_daily_202007
    {
    "settings": {
    "number_of_shards": 9,
    "number_of_replicas": 1
    },
    "mappings": {
    "goods": {
    "_all": {
    "enabled": false
    },
    "properties": {
    "id": {
    "type": "long"
    },
    "entId": {
    "type": "long"
    },
    "orgId": {
    "type": "long"
    },
    "mnTaxexDayPrice": {
    "type": "double"
    },
    "mnTaxexDayAmt": {
    "type": "double"
    },
    "fnTaxexDayPrice": {
    "type": "double"
    },
    "fnTaxexDayAmt": {
    "type": "double"
    },
    "fnTaxinDayPrice": {
    "type": "double"
    },
    "fnTaxinDayAmt": {
    "type": "double"
    },
    "depotId": {
    "type": "long"
    },
    "depotCode": {
    "type": "keyword"
    },
    "depotName": {
    "type": "text"
    },
    "goodsId": {
    "type": "long"
    },
    "goodsCode": {
    "type": "keyword"
    },
    "goodsName": {
    "type": "text"
    },
    "goodsClassId": {
    "type": "long"
    },
    "goodsClassCode": {
    "type": "keyword"
    },
    "goodsClassName": {
    "type": "text"
    },
    "stockDate": {
    "type": "date",
    "format": "yyyy-MM-dd"
    },
    "periodNo": {
    "type": "keyword"
    },
    "dayFinQty": {
    "type": "double"
    },
    "dayPrice": {
    "type": "double"
    },
    "dayAmt": {
    "type": "double"
    },
    "dayFinPrice": {
    "type": "double"
    },
    "dayFinAmt": {
    "type": "double"
    },
    "dayIniQty": {
    "type": "double"
    },
    "dayIniAmt": {
    "type": "double"
    },
    "dayIniFinAmt": {
    "type": "double"
    },
    "dayOutQty": {
    "type": "double"
    },
    "dayOutAmt": {
    "type": "double"
    },
    "dayOutFinAmt": {
    "type": "double"
    },
    "dayInQty": {
    "type": "double"
    },
    "dayInAmt": {
    "type": "double"
    },
    "dayInFinAmt": {
    "type": "double"
    },
    "dayCheckQty": {
    "type": "double"
    },
    "dayCheckAmt": {
    "type": "double"
    },
    "dayCheckFinAmt": {
    "type": "double"
    },
    "dayAvgOutQty": {
    "type": "double"
    },
    "dayFixQty": {
    "type": "double"
    },
    "dayFixAmt": {
    "type": "double"
    },
    "dayIniInQty": {
    "type": "double"
    },
    "dayIniInAmt": {
    "type": "double"
    },
    "preDayQty": {
    "type": "double"
    },
    "preDayPrice": {
    "type": "double"
    },
    "preDayAmt": {
    "type": "double"
    },
    "version": {
    "type": "integer"
    },
    "deleted": {
    "type": "long"
    },
    "creatorCode": {
    "type": "text"
    },
    "creatorName": {
    "type": "text"
    },
    "createdAt": {
    "type": "date",
    "format": "yyyy-MM-dd HH:mm:ss"
    },
    "creatorOrgCode": {
    "type": "text"
    },
    "modifierCode": {
    "type": "text"
    },
    "modifierName": {
    "type": "text"
    },
    "lastModifiedAt": {
    "type": "date",
    "format": "yyyy-MM-dd HH:mm:ss"
    },
    "modifierOrgCode": {
    "type": "text"
    },
    "postLastModified": {
    "type": "date",
    "format": "yyyy-MM-dd HH:mm:ss"
    }
    }
    }
    }
    }


    GET /inv_trans_detail/_mapping

    PUT /inv_trans_detail/_mapping/goods
    {
    "goods": {
    "properties": {
    "isDataExt": {
    "type": "long"
    },
    "isDateExt": {
    "type": "long"
    },
    "isBillDataExt": {
    "type": "long"
    }
    }
    }
    }

    POST inv_stock_daily/_delete_by_query
    {

    "query": {
    "range": {
    "stockDate": {
    "from": "2021-02-01",
    "to": "2021-04-01"
    }
    }
    }
    }

    因为相信,所以看见.
  • 相关阅读:
    更改eclipse(myeclipse) author的默认名字(注释的作者)
    Myecplise Tomcat 启动很慢
    Java Enum 比较用 == 还是 eques
    Spring JDBC查询返回对象代码跟踪
    Apache启动失败(Windows 无法在本地计算机启动Apache2.2)
    SQLServer2008 统计表占用空间
    SET IDENTITY_INSERT ON/OFF 权限
    字母出现频率
    统计单词数
    查找最大元素
  • 原文地址:https://www.cnblogs.com/zeenzhou/p/14580075.html
Copyright © 2011-2022 走看看