美文网首页
ES常用命令-项目中实际使用

ES常用命令-项目中实际使用

作者: 不怕天黑_0819 | 来源:发表于2020-10-26 17:10 被阅读0次
    
    GET /_cat/shards
    GET /?pretty
    GET /_settings
    
    
    POST subscribe_wemedia_info/wemedia_info/W4858903657506910744/_update?routing=W4858903657506910744
    { 
       "script" : {
            "inline": "ctx._source.articleCount = params.count;ctx._source.remark=params.remark",
            "params" : {
                "count" : 4,
                "remark":"12222"
            }
        }
    }
    
    POST subscribe_wemedia_info/wemedia_info/_update_by_query
    {
        "script" : {
            "inline": "ctx._source.articleCount = params.count;ctx._source.remark=params.remark",
            "params" : {
                "count" : 5,
                "remark":"12233322"
            }
        },
      "query": {
        "term": {
          "wemediaId": "W4858903657506910744"
        }
      }
    }
    
    
    
    
    POST subscribe_wemedia_info/wemedia_info/_update_by_query
    {
      "script": {
        "inline": "ctx._source.articleCount=4;ctx._source.remark=\"12345678\""
      },
      "query": {
        "term": {
          "wemediaId": "W4858903657506910744"
        }
      }
    }
    
    
     public void updateByQuery() {
            UpdateByQueryRequestBuilder queryRequestBuilder = UpdateByQueryAction.INSTANCE
                    .newRequestBuilder(client);
            Script script = new Script("ctx._source.articleCount=4;ctx._source.remark='123'");
            Map<String, Object> params = new HashMap<>();
            params.put("articleCount", 111);
            params.put("tdesc", "desc123");
            Script script1 = new Script(ScriptType.INLINE, "painless", idOrCode, Collections.emptyMap(), params);
    
            BulkByScrollResponse bulkByScrollResponse = queryRequestBuilder.source("subscribe_wemedia")
                    .script(script)
                    .filter(termQuery("wemediaId", "W1393877162903029570"))
                    .get();
            bulkByScrollResponse.getUpdated();
        }
    
    
    POST /test1/test1/1
    {
      "id":"1",
      "title":"北京天坛风景",
      "uploader_name":"felayman",
      "uploader_id":"1",
      "keyword":[
        {
          "categoryId":"1",
          "content":"北京"
        },
        {
          "categoryId":"2",
          "content":"天坛"
        },
        {
          "categoryId":"3",
          "content":"秋天"
        },
        {
          "categoryId":"4",
          "content":"旅游"
        }
        ]
    }
    
    
    POST /test1/test1/2
    {
      "id":"2",
      "title":"美国波士顿",
      "uploader_name":"felayman",
      "uploader_id":"1",
      "keyword":[
        {
          "categoryId":"1",
          "content":"波士顿"
        },
        {
          "categoryId":"2",
          "content":"夏天"
        },
        {
          "categoryId":"3",
          "content":"旅游"
        }
        ]
    }
    
    POST /subscribe_video_material/video_material/_mapping?pretty
    {
         "video_material": {
                    "properties": {
     "adState": {
                "type": "integer"
              }            }
            }
    }
    
    
    GET /_cat/shards
    GET /?pretty
    GET /_settings
    GET _cluster/settings
    GET /_cat/shards
    GET /?pretty
    GET /_settings
    GET /_stats/search?level=shards
    
    GET /_cluster/stats?pretty
    GET /_stats
    GET /_nodes/stats?pretty
    
    POST subscribe_content_manage/content_manage_info/_search?pretty
    {
      "size" : 0,
      "query" : {
        "bool" : {
          "must" : [
            {
              "terms" : {
                "wemediaId" : [
                  "W96092081001313115",
                  "W9169170520596171631",
                  "W8936683673585143748",
                  "W8686760738142175849",
                  "W7926395986431002398",
                  "W7181648061432024431",
                  "W6469093737995941713",
                  "W5702634611385517836",
                  "W5073294438392810613",
                  "W4978779839535466175",
                  "W4067036974474900636",
                  "W3651284199076547212",
                  "W2927332785890702596",
                  "W2034767628305019540",
                  "W1739626296807308117",
                  "W1404504214715252999",
                  "W1112279127475402340"
                ],
                "boost" : 1.0
              }
            },
            {
              "term" : {
                "isDel" : {
                  "value" : 0,
                  "boost" : 1.0
                }
              }
            }
          ],
          "disable_coord" : false,
          "adjust_pure_negative" : true,
          "boost" : 1.0
        }
      },
      "aggregations" : {
        "media" : {
          "terms" : {
            "field" : "wemediaId",
            "min_doc_count" : 1,
            "shard_min_doc_count" : 0,
            "show_term_doc_count_error" : false,
            "order" : [
              {
                "_count" : "desc"
              },
              {
                "_term" : "asc"
              }
            ]
          },
          "aggregations" : {
            "contentType" : {
              "terms" : {
                "field" : "contentType",
                "min_doc_count" : 0,
                "shard_min_doc_count" : 0,
                "show_term_doc_count_error" : false,
                "order" : [
                  {
                    "_count" : "desc"
                  },
                  {
                    "_term" : "asc"
                  }
                ]
              }
            }
          }
        }
      }
    }
    
    POST subscribe_wemedia/wemedia_info/W5359769653144763125/_update?routing=W5359769653144763125
    {
          "doc": {
            "concernBusiness": [
                {
                  "name": "公开课"
                }
              ]
          }
    }
    
    
    GET subscribe_content_manage/content_manage_info/_count
    {
      "query": {
        "bool": {
          "must": [
            {
              "match": {
                "originalState": "0"
              }
            },{
              "range": {
                "createTime": {
                  "lte": "2017-01-01 00:00:00"
                  
                }
              }
            },{
              "match": {
                "isDel": "0"
              }
            },{
              "match": {
                "contentType": "2"
              }
            },{
              "bool": {
                "must": [
                  {
                    "match_all": {}
                  }
                ]
              }
            }
          ]
        }
      }
    }
    
    
    PUT /_cluster/settings
    {
        "transient" : {
            "logger.index.search.slowlog" : "trace", 
            "logger.index.indexing.slowlog" : "WARN" 
        }
    }
    
    
    PUT /subscribe_content_manage/_settings
    {
      "index.search.slowlog.threshold.query.warn": "5ms",
    "index.search.slowlog.threshold.query.info": "4ms" ,
    "index.search.slowlog.threshold.query.debug":"2ms",
    "index.search.slowlog.threshold.query.trace": "1ms" 
    }
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "size": 1,
      "query": {
        "bool": {
          "must": [
            {
              "range": {
                "publishTime": {
                  "gte": "now-2d+8h"
                }
              }
            },
            {
              "term": {
                "contentState": {
                  "value": "3"
                }
              }
            }
          ]
        }
      },
      "aggregations": {
        "group_wemediaId": {
          "terms": {
            "field": "wemediaId",
            "size": 10000,
            "shard_min_doc_count": 1,
            "show_term_doc_count_error": false,
            "order": [
              {
                "_count": "desc"
              }
            ]
          }
        }
      }
    }
    
    
    GET /subscribe_content_manage/content_manage_info/_search
    {
        "query" : {
          "range": {
            "createTime": {
              "gte": "now-1d"
              
            }
          }},
       "size" : 0,
       "aggs": {
          "grades_contentState": {
            "cardinality": {
              "field": "contentType"
            }
          }
       }
    }
    
    
    
    GET /subscribe_moparticle/_analyze?analyzer="ik_smart"
    {
      "text": [
        "apple apple火星撞地球火星撞地球"]
    }
    
    GET /subscribe_content_manage/content_manage_info/_search
    {
        "query" : {
          "range": {
            "createTime": {
              "gte": "now-10d"
              
            }
          }},
       "size" : 0,
       "aggs": {
          "sales": {
             "date_histogram": {
                "field": "createTime",
                "interval": "day", 
                "format": "yyyy-MM-dd" 
             }
          }
       }
    }
    
    POST /subscribe_recommend_info/recommend_info/VBRAR2O432?routing=W2591355067903397690
    {
      "contentType": 2,
              "docid": "VBRAR2O432",
              "title": "撩你是认真的!@抖音小助手",
              "category": "舞蹈/舞蹈教学",
              "tags": "付费 gg",
              "interests": "POI娱乐_舞蹈教程,POI艺术_舞蹈",
              "tid": "T1480416235226",
              "wemediaId": "W2591355067903397690",
              "sourceName": "caigen",
              "publishTime": "2018-07-02 18:08:12"
    }
    
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "query" : {
        "bool" : {
          "must" : [
            {
              "term" : {
                "source" : {
                  "value" : 1,
                  "boost" : 1.0
                }
              }
            },
            {
              "range" : {
                "createTime" : {
                  "from" : "now-7d",
                  "to" : null,
                  "include_lower" : true,
                  "include_upper" : true,
                  "boost" : 1.0
                }
              }
            },
            {
              "term" : {
                "contentType" : {
                  "value" : 1,
                  "boost" : 1.0
                }
              }
            }
          ],
          "disable_coord" : false,
          "adjust_pure_negative" : true,
          "boost" : 1.0
        }
      },
      "aggregations" : {
        "createTime_aggs" : {
          "date_histogram" : {
            "field" : "createTime",
            "format" : "yyyy-MM-dd HH",
            "interval" : "1h",
            "offset" : 0,
            "order" : {
              "_key" : "asc"
            },
            "keyed" : false,
            "min_doc_count" : 0
          }
        }
      }
    }
    
       "aggs": {
          "sales": {
             "date_histogram": {
                "field": "createTime",
                "interval": "day", 
                "format": "yyyy-MM-dd" 
             }
          }
       }
    
    
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "query" : {
        "term" : {
          "contentState" : {
            "value" : 2,
            "boost" : 1.0
          }
        }
      },
      "size": 0,
      "aggregations" : {
        "group_wemediaId" : {
          "terms" : {
            "field" : "wemediaId",
            
            "size" : 41,
            "min_doc_count" : 2,
            "shard_min_doc_count" : 0,
            "show_term_doc_count_error" : false,
            "order" : [
              {
                "_count" : "desc"
              },
              {
                "_term" : "asc"
              }
            ]
          }
        }
      }
    }
    
    PUT /subscribe_wemedia/_settings
    {
        "index" : {
            "refresh_interval" : "1s"
        }
    }
    
    GET .monitoring-es-2-2017.12.18/_search
    {
      "query": {
        "bool": {
          "must": [
            
               {
              "range": {
                "node_stats.thread_pool.search.queue": {
                  "gte": 0
                }
              }
            },
            {
              "range": {
                "timestamp": {
                  "gte":"now-500m"
                }
              }
            }
          ]
        }}}
    
    GET /.monitoring-es-2-2017.12.15/_search
    {
      "size": 200, 
      "query": {
        "range": {
          "node_stats.thread_pool.search.queue":{
            "gte": 1
            
          } 
        }
      }
      , "sort": [
        {
          "timestamp": {
            "order": "desc"
          }
        }
      ]
    }
    
    
    POST /_xpack/security/user/jockbeat
    {
      "password" : "jockbeat",
      "full_name" : "jock beat",
      "email" : "john.doe@anony.mous",
      "roles" : [ "beats_admin" ]
    }
    
    
    GET subscribe_wemedia_info/wemedia_info/_search
    {
      
    "query": {
      "range": {
        "createTime": {
        
          "lte": "now",
          "time_zone": "Asia/Shanghai"
    
        }
      }
    }
    }
    
    
    GET /_cat/shards
    GET /_cluster/stats?pretty
    
    
    POST subscribe_wemedia/wemedia_info/W5854357597708239041/_update?routing=W5854357597708239041
    { 
       "script" : {
            "inline": "ctx._source.articleCount = ctx._source.creditLevel",
            "params" : {
                "count" : 1334,
                "remark":"12222"
            }
        }
    }
    
    PUT /my_index/_alias/my_index_2
    
    GET my_inde/my_type/_mapping
    GET /*/_alias/my_index_alias
    
    
    POST subscribe_wemedia/wemedia_info/_update_by_query?timeout=20000ms
    {
        "script" : {
            "inline": "ctx._source.testScript=0",
            "params" : {
                "count" : 5,
                "remark":"12233322"
            }
        },
      "query": {
        "match_all": {
        }
      }
    }
    
    
    
    POST subscribe_content_manage/content_manage_info/_update_by_query
    {
        "script" : {
            "inline": "ctx.op='delete'"
        },
      "query": {
        "bool": {
          "must": [
            {"match": {
              "wemediaId": "W6273030194652137237"
            }},{
              "match": {
                "contentType": "2"
              }
            }
          ]
        }
      }
    }
    
    POST my_index/my_type/_update_by_query
    {
        "script" : {
            "inline": "ctx._source.remove(\"remove_field\")"
        },
      "query": {
        "term": {
          "remove_field": 1
        }
      }
    }
    
    POST /my_index/my_type/1/_update
    {
        "script" : {
            "inline": "ctx._source.tags.contains(tag) ? ctx.op = \"delete\" : ctx.op = \"none\"",
            "params" : {
                "tag" : "blue"
            }
        }
    }
    
    POST /my_index/my_type/6/_update
    {
       "script" : "ctx._source.views+=1",
       "upsert": {
           "views": 1,
           "string_field":"new sore"
       }
    }
    
    POST /my_index/my_type/2/_update
    {
        "script" : "ctx._source.remove(\"remove_field\")"
    }
    
    
    POST /my_index/my_type/5/_update
    {
       "script" : {
            "inline": "ctx.op = (ctx._source.views == params.count )? 'delete' : 'none'",
            "params" : {
                "count" : 2
            }
        }
    }
    
    POST /my_index/my_type/1/_update
    {
       "script" : "ctx.op = ctx._source.views == 1 ? 'delete' : 'none'",
        "params" : {
            "count": 1
        }
    }
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      
      "query" : {
        "bool" : {
          "must" : [
            {
              "term" : {
                "source" : {
                  "value" : 1,
                  "boost" : 1.0
                }
              }
            },
            {
              "range" : {
                "createTime" : {
                  "from" : "now-7d",
                  "to" : null,
                  "include_lower" : true,
                  "include_upper" : true,
                  "boost" : 1.0
                }
              }
            }
          ],
          "disable_coord" : false,
          "adjust_pure_negative" : true,
          "boost" : 1.0
        }
      },
      "aggregations" : {
        "contentType" : {
          "value_count" : {
            "field" : "contentType"
          },
          "aggregations" : {
            "createTime" : {
              "date_histogram" : {
                "interval" : "1h",
                "offset" : 0,
                "order" : {
                  "_key" : "asc"
                },
                "keyed" : false,
                "min_doc_count" : 0
              }
            }
          }
        }
      }
    
    }
    
    POST subscribe_wemedia/wemedia_info/_update_by_query
    {
      "script": {
        "inline": "ctx._source.verifyPhone=\"\""
      },
      "query": {
        "term": {
          "verifyPhone": "17310034024"
        }
      }
    }
    
    POST subscribe_wemedia/wemedia_info/_update_by_query
    {
      "script": {
        "inline": "ctx._source.mcnFlag=1"
      },
      "query": {
        "match":{
          "wemediaId":"W4211537089812971765"
        }
      }
    }
    
    
    POST /subscribe_video_material/video_material/_mapping?pretty
    {
         "video_material": {
                    "properties": {
     "dramaName": {
                "type": "text",
                "fields": {
                  "en": {
                    "type": "text",
                    "analyzer": "english"
                  },
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                },
                "analyzer": "ik_smart"
              }            }
            }
    }
    
    GET /_nodes/process
    GET /_nodes/process?pretty
    
    GET /_cat/shards
    
    
    POST /_cluster/reroute
    {
            "commands" : [ {
                  "allocate" : {
                      "index" : "subscribe_content_manage",
                      "shard" : 5,
                      "node" : "xx2ebDkcScudtEz26QIKTQ",
                      "allow_primary" : true
                  }
                }
            ]
        }
        
        
    POST /_cluster/reroute
    {
      "commands": [
        {
          "allocate": {
            "index": "subscribe_content_manage",
            "shard": 0,
            "node": "xx2ebDkcScudtEz26QIKTQ",
            "allow_primary": true
          }
        }
      ]
    }
        PUT my_index/_settings
        {
          "number_of_replicas": 1
        }
        
        GET subscribe_content_manage/_mapping
        
        
    POST /_cluster/reroute
    {
        "commands" : [
            {
                "move" : {
                    "index" : "subscribe_wemedia", "shard" : 3,
                    "from_node" : "bjyz-subscribe-nginx-4", "to_node" : "bjyz-nc-elktest1"
                }
            }
        ]
    }
    
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      
      "from" : 0,
      "size" : 20,
      "query" : {
      "bool" : {
        "must" : [
        
          {
            "exists" : {
              "field" : "logInfo"
            }
          }
        ],
        "disable_coord" : false,
        "adjust_pure_negative" : true,
        "boost" : 1.0
      }
    }
    }
    
    POST subscribe_wemedia/wemedia_info/_update_by_query
    {
      "script": {
        "inline": "ctx._source.mcnFlag=1"
      },
      "query": {
        
        "match":{
          "wemediaId":"W5827704775633975749"
        }
      }
    }
    
    GET /subscribe_content_manage/content_manage_info/_search
    {
       "size" : 0,
       "aggs": {
          "sales": {
             "date_histogram": {
                "field": "createTime",
                "interval": "day", 
                "format": "yyyy-MM-dd" 
             }
          }
       }
    }
    
    POST subscribe_wemedia_info/wemedia_info/_update_by_query
    {
      "script": {
        "inline": "ctx._source.articleCount+=1;ctx._source.lastPublishTime='2018-01-12 15:34:37'"
      },
      "query": {
        "match": {
          "wemediaId": "W2240354508151476015"
        }
      }
    }
    
    GET subscribe_wemedia/wemedia_info/_search
    {
      
      "from" : 0,
      "size" : 20,
      "query" : {
        "bool" : {
          "must" : [
            {
              "match" : {
                "tname" : {
                  "query" : "虎嗅网",
                  "operator" : "OR",
                  "prefix_length" : 0,
                  "max_expansions" : 50,
                  "fuzzy_transpositions" : true,
                  "lenient" : false,
                  "zero_terms_query" : "NONE",
                  "boost" : 1.0
                }
              }
            },
            {
              "nested" : {
                "query" : {
                  "bool" : {
                    "must" : [
                      {
                        "term" : {
                          "mcn.contractState" : {
                            "value" : 1,
                            "boost" : 1.0
                          }
                        }
                      },
                      {
                        "term" : {
                          "mcn.mainWemediaId" : {
                            "value" : "W4211537089812971765",
                            "boost" : 1.0
                          }
                        }
                      }
                    ],
                    "disable_coord" : false,
                    "adjust_pure_negative" : true,
                    "boost" : 1.0
                  }
                },
                "path" : "mcn",
                "ignore_unmapped" : false,
                "score_mode" : "avg",
                "boost" : 1.0
              }
            }
          ]
      }
    }
    }
    
    
    DELETE /subscribe_wemedia/wemedia_info/W2220536374439332037?routing=W2220536374439332037
    
    
    GET subscribe_customer_v1
      
    PUT /subscribe_customer_v1/_alias/subscribe_customer
        
    GET /subscribe_wemedia/wemedia_info/_search
    {
     "query": {
       "match_all": {}
     }
    }
    
    
    POST _reindex
    {
      "source": {
        "index": "twitter",
        "type": "tweet",
        "query": {
          "term": {
            "user": "kimchy"
          }
        }
      },
      "dest": {
        "index": "new_twitter"
      }
    }
    
    POST /_aliases
    {
    "actions": [
    { "remove": { "index": "subscribe_wemedia_info", "alias": "subscribe_wemedia" }},
    { "add": { "index": "subscribe_wemedia_info_v2", "alias": "subscribe_wemedia" }}
    ]
    }
    
    
    
    POST _reindex
    {
      "source": {
        "index": "subscribe_wemedia_info",
        "type": "wemedia_info",
        "_source": ["wemediaId", "userId","accountQuality","accountType","articleCount","articleCountMonthly","auditingPunishmentCount","categoryIds","cid","cname","createTime","creditLevel","integral","isShareIncome","isVip","lastPublishTime","liveApplyState","liveApplyTime","local","localCity","localProvince","mcn","mcnFlag","mediaTag","newVideoQuality","onlineOptime","onlineState","originalApplyState","originalApplyTime","originalFlag","originalTime","ownerType","preAuditState","preAuditor","preQuality","preVideoQuality","punishmentCount","pushApplyState","pushApplyTime","refuseCount","shortNewsFlag","star","tid","tname","topicId","userIdPrefix","userIdcard","verifyPhone","videoAccountClassify","videoQuality","upTime"]
      },
      "dest": {
        "index": "subscribe_wemedia_info_v2",
        "type": "wemedia_info"
      }
    }
    
    
    GET subscribe_wemedia/_mapping
    
    POST /_aliases
    {
        "actions": [
            { "remove": { "index": "subscribe_wemedia_info", "alias": "subscribe_wemedia" }},
            { "add":    { "index": "subscribe_wemedia_info_v2", "alias": "subscribe_wemedia" }}
        ]
    }
    
    GET subscribe_wemedia_info_v2/_mapping
    
    GET subscribe_wemedia_info_v2/wemedia_info/_search
    {
      "query": {
        "match": {
          "mcn.contractState": 
        }
      }
    }
    
    GET subscribe_video_material/_mapping
    
    
    POST /subscribe_wemedia/wemedia_info/_mapping?pretty
    {
         "wemedia_info" : {
                    "properties": {
                      "dramaName": {
                "type": "text",
                "fields": {
                  "en": {
                    "type": "text",
                    "analyzer": "english"
                  },
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                },
                "analyzer": "ik_smart"
              }
                    }
            }
    }
    
    POST /subscribe_wemedia_info_v2/wemedia_info/_mapping?pretty
    {
         "wemedia_info" : {
                    "properties": {
      "blackType": {
                "type": "integer"
              }          }
            }
    }
    
    
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "from" : 0,
      "size" : 20,
      "query" : {
        "bool" : {
          "must" : [
            {
              "term" : {
                "contentType" : {
                  "value" : 1,
                  "boost" : 1.0
                }
              }
            },
            {
              "range" : {
                "createTime" : {
                  "from" : "2017-01-01 00:00:00",
                  "to" : "2018-05-11 00:00:00",
                  "include_lower" : true,
                  "include_upper" : true,
                  "boost" : 1.0
                }
              }
            },
            {
              "term" : {
                "wemediaId" : {
                  "value" : "W5359769653144763125",
                  "boost" : 1.0
                }
              }
            },
            {
              "term" : {
                "isDel" : {
                  "value" : 0,
                  "boost" : 1.0
                }
              }
            },
            {
              "term" : {
                "originalState" : {
                  "value" : 1,
                  "boost" : 1.0
                }
              }
            }
          ],
          "must_not" : [
            {
              "term" : {
                "copyCount" : {
                  "value" : -1,
                  "boost" : 1.0
                }
              }
            },
            {
              "range" : {
                "copyCount" : {
                  "from" : 0,
                  "to" : null,
                  "include_lower" : false,
                  "include_upper" : true,
                  "boost" : 1.0
                }
              }
            }
          ],
          "disable_coord" : false,
          "adjust_pure_negative" : true,
          "boost" : 1.0
        }
      },
      "sort" : [
        {
          "publishTime" : {
            "order" : "desc"
          }
        }
      ]
    }
    
    POST subscribe_content_manage/content_manage_info/_update_by_query?timeout=100s
    {
      "script": {
        "inline": "ctx._source.copyCount=1"
      },
      "query": {
        "terms": {
              "articleId": [
               "DO7JH2F5053089C4"
              ]
            }
      }
    }
    
    
    
    
    GET subscribe_video_material/video_material/_search
    {
      
      "query": {
        "bool": {
          "must": [
            {
              "match": {
                "videoId": "VUJ8SCJ7H"
              }
            }
          ]
        }
      },
      "sort": [
        {
          "createTime": {
            "order": "desc"
          }
        }
      ]
    }
    
    PUT /subscribe_wemedia_info_v2
    {
        "settings": {
            "number_of_shards": 6,
            "number_of_replicas": 1
        },
        "mappings": {
            "wemedia_info": {
            "dynamic": "false",
            "_all": {
              "enabled": false
            },
            "properties": {
              "accountQuality": {
                "type": "integer"
              },
              "accountType": {
                "type": "integer"
              },
              "articleCount": {
                "type": "long"
              },
              "articleCountMonthly": {
                "type": "long"
              },
              "auditingPunishmentCount": {
                "type": "long"
              },
              "categoryIds": {
                "type": "keyword"
              },
              "cid": {
                "type": "keyword"
              },
              "cname": {
                "type": "keyword"
              },
              "createTime": {
                "type": "date",
                "format": "yyyy-MM-dd HH:mm:ss"
              },
              "creditLevel": {
                "type": "integer"
              },
              "integral": {
                "type": "integer"
              },
              "isShareIncome": {
                "type": "integer"
              },
              "isVip": {
                "type": "integer"
              },        
              "lastPublishTime": {
                "type": "date",
                "format": "yyyy-MM-dd HH:mm:ss"
              },
              "liveApplyState": {
                "type": "integer"
              },
              "liveApplyTime": {
                "type": "date",
                "format": "yyyy-MM-dd HH:mm:ss"
              },
              "local": {
                "type": "integer"
              },
              "localCity": {
                "type": "keyword"
              },
              "localProvince": {
                "type": "integer"
              },
              "mcn": {
                "type": "nested",
                "properties": {
                  "contractId": {
                    "type": "keyword"
                  },
                  "contractState": {
                    "type": "integer"
                  },
                  "mainWemediaId": {
                    "type": "keyword"
                  }
                }
              },
              "mcnFlag": {
                "type": "integer"
              },
              "mediaTag": {
                "type": "integer"
              },
              "newVideoQuality": {
                "type": "integer"
              },
              "onlineOptime": {
                "type": "date",
                "format": "yyyy-MM-dd HH:mm:ss"
              },
              "onlineState": {
                "type": "integer"
              },
              "originalApplyState": {
                "type": "integer"
              },
              "originalApplyTime": {
                "type": "date",
                "format": "yyyy-MM-dd HH:mm:ss"
              },
              "originalFlag": {
                "type": "integer"
              },
              "originalTime": {
                "type": "date",
                "format": "yyyy-MM-dd HH:mm:ss"
              },
              "ownerType": {
                "type": "integer"
              },
              "preAuditState": {
                "type": "integer"
              },
              "preAuditor": {
                "type": "integer"
              },
              "preQuality": {
                "type": "integer"
              },
              "preVideoQuality": {
                "type": "integer"
              },
              "punishmentCount": {
                "type": "long"
              },
              "pushApplyState": {
                "type": "integer"
              },
              "pushApplyTime": {
                "type": "date",
                "format": "yyyy-MM-dd HH:mm:ss"
              },
               "upTime": {
                "type": "date",
                "format": "yyyy-MM-dd HH:mm:ss"
              },
              "refuseCount": {
                "type": "long"
              },
              "shortNewsFlag": {
                "type": "integer"
              },
              "star": {
                "type": "integer"
              },
              "tid": {
                "type": "keyword",
                "store": true 
              },
              "tname": {
                "type": "text",
                "fields": {
                  "en": {
                    "type": "text",
                    "analyzer": "english"
                  },
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                },
                "analyzer": "ik_smart"
              },
              "topicId": {
                "type": "keyword"
              },
              "userId": {
                "type": "keyword",
                "store": true 
              },
              "userIdPrefix": {
                "type": "keyword"
              },
              "userIdcard": {
                "type": "keyword"
              },
              "verifyPhone": {
                "type": "keyword"
              },
              "videoAccountClassify": {
                "type": "integer"
              },
              "videoQuality": {
                "type": "integer"
              },
              "wemediaId": {
                "type": "keyword",
                "store": true 
              }
            }
          }
        }  
    }    
    
    
    GET /_cluster/stats?pretty
    GET custom/_mapping
    
    PUT /subscribe_recommend_info_v1/_alias/subscribe_recommend_info
    
    PUT /subscribe_recommend_info_v1
    {
        "settings": {
            "number_of_shards": 6,
            "number_of_replicas": 1
        },
        "mappings": {
            "recommend_info": {
            "dynamic": "false",
            "_all": {
              "enabled": false
            },
            "properties": {
              "docid": {
                "type": "keyword"
              },
              "contentType": {
                "type": "integer"
              },
              "tid": {
                "type": "keyword"
              },
              "wemediaId": {
                "type": "keyword"
              },
              "publishTime": {
                "type": "date",
                "format": "yyyy-MM-dd HH:mm:ss"
              },
              "title": {
                "type": "text",
                "fields": {
                  "en": {
                    "type": "text",
                    "analyzer": "english"
                  },
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                },
                "analyzer": "ik_smart"
              },
              "tags": {
                "type": "text",
                "fields": {
                  "en": {
                    "type": "text",
                    "analyzer": "english"
                  },
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                },
                "analyzer": "ik_smart"
              },
              "interests": {
                "type": "text",
                "fields": {
                  "en": {
                    "type": "text",
                    "analyzer": "english"
                  },
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                },
                "analyzer": "ik_smart"
              },
               "sourceName": {
                "type": "text",
                "fields": {
                  "en": {
                    "type": "text",
                    "analyzer": "english"
                  },
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                },
                "analyzer": "ik_smart"
              },
              "category": {
                "type": "text",
                "fields": {
                  "en": {
                    "type": "text",
                    "analyzer": "english"
                  },
                  "keyword": {
                    "type": "keyword"
                  }
                },
                "analyzer": "ik_smart"
              }
            }
          }
        }
    }
        
        
    
    PUT /subscribe_customer_v1
    {
        "settings": {
            "number_of_shards": 6,
            "number_of_replicas": 1
        },
        "mappings": {
            "customer_doc": {
            "dynamic": "false",
            "_all": {
              "enabled": false
            },
            "properties": {
              "lspri": {
                "type": "integer"
              },
              "docid": {
                "type": "keyword"
              },
              "topicid": {
                "type": "keyword"
              },
              "ptime": {
                "type": "date",
                "format": "yyyy-MM-dd HH:mm:ss"
              },
              "title": {
                "type": "text",
                "fields": {
                  "en": {
                    "type": "text",
                    "analyzer": "english"
                  },
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                },
                "analyzer": "ik_smart"
              },
              "body": {
                "type": "text",
                "fields": {
                  "en": {
                    "type": "text",
                    "analyzer": "english"
                  },
                  "keyword": {
                    "type": "keyword"
                  }
                },
                "analyzer": "ik_smart"
              },
              "imgsrc": {
                "type": "keyword"
              },
              "url": {
                "type": "keyword"
              }
            }
          }
        }
    }
        
        
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "query": {
        "bool" : {
          "must" : [
            {
              "terms" : {
                "skipId" : [
                  "VAO8D3QQA",
                  "VZGU1E115",
                  "VZD20DBQO"
                ],
                "boost" : 1.0
              }
            }
          ],
          "disable_coord" : false,
          "adjust_pure_negative" : true,
          "boost" : 1.0
        }
      
    }
    }
    PUT /_cluster/settings
    {
        "transient" : {
            "logger.index.search.slowlog" : "trace", 
            "logger.index.indexing.slowlog" : "WARN" 
        }
    }
    
    
    PUT /subscribe_content_manage/_settings
    {
      "index.search.slowlog.threshold.query.warn": "5ms",
    "index.search.slowlog.threshold.query.info": "4ms" ,
    "index.search.slowlog.threshold.query.debug":"2ms",
    "index.search.slowlog.threshold.query.trace": "1ms" 
    }
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "size": 1,
      "query": {
        "bool": {
          "must": [
            {
              "range": {
                "publishTime": {
                  "gte": "now-2d+8h"
                }
              }
            },
            {
              "term": {
                "contentState": {
                  "value": "3"
                }
              }
            }
          ]
        }
      },
      "aggregations": {
        "group_wemediaId": {
          "terms": {
            "field": "wemediaId",
            "size": 10000,
            "shard_min_doc_count": 1,
            "show_term_doc_count_error": false,
            "order": [
              {
                "_count": "desc"
              }
            ]
          }
        }
      }
    }
    
    
    GET /subscribe_content_manage/content_manage_info/_search
    {
        "query" : {
          "range": {
            "createTime": {
              "gte": "now-1d"
              
            }
          }},
       "size" : 0,
       "aggs": {
          "grades_contentState": {
            "cardinality": {
              "field": "contentType"
            }
          }
       }
    }
    
    
    
    
    
    
    
    GET /subscribe_moparticle/_analyze?analyzer="ik_smart"
    {
      "text": [
        "apple apple火星撞地球火星撞地球"]
    }
    
    GET subscribe_video_material/video_material/_search
    {
     "query": {
       "match": {
         "videoId": "VUHNDCC2L"
       }
     } 
    }
    GET subscribe_wemedia/_mapping
    
    GET subscribe_wemedia/wemedia_info/_search
    {
      "query": {
        "match": {
          "tid":"T1530169786732"
        }
      }
    }
    GET subscribe_content_manage/content_manage_info/_search
    {
      "query": {
        "match_all": {}
      }
      , "sort": [
        {
          "createTime": {
            "order": "desc"
          }
        }
      ]
    }
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "query": {
        "match": {
          "skipId": "VZM2CF0DG"
        }
      }
    }
    
    
    GET subscribe_moparticle/moparticle/_search
    {
      
      "size" : 100,
      "query" : {
        "bool" : {
          "must" : [
            {
              "term" : {
                "MCNMainWemediaId" : {
                  "value" : "W5694026176545180886",
                  "boost" : 1.0
                }
              }
            },
            {
              "term" : {
                "contentType" : {
                  "value" : 1,
                  "boost" : 1.0
                }
              }
            },
            {
              "term" : {
                "del" : {
                  "value" : 0,
                  "boost" : 1.0
                }
              }
            },
            {
              "term" : {
                "topicid" : {
                  "value" : "052580G2",
                  "boost" : 1.0
                }
              }
            }
          ],
          "disable_coord" : false,
          "adjust_pure_negative" : true,
          "boost" : 1.0
        }
      },
      "stored_fields" : "docid",
      "sort" : [
        {
          "docid" : {
            "order" : "desc"
          }
        }
      ]
    }
      
    
    
    GET subscribe_moparticle/moparticle/_search
    {
      "query": {
        "match": {
          "topicid": "052580G2"
        }
      }
    }
    
    GET subscribe_wemedia/wemedia_info/_search
    {
      "query": {
        "match_all": {}
      }
    }
    
    GET subscribe_wemedia/_mapping
    
    GET /subscribe_content_manage/content_manage_info/_search
    {
        "query" : {
          "range": {
            "createTime": {
              "gte": "now-10d"
              
            }
          }},
       "size" : 0,
       "aggs": {
          "sales": {
             "date_histogram": {
                "field": "createTime",
                "interval": "day", 
                "format": "yyyy-MM-dd" 
             }
          }
       }
    }
    
    POST /subscribe_recommend_info/recommend_info/VBRAR2O432?routing=W2591355067903397690
    {
      "contentType": 2,
              "docid": "VBRAR2O432",
              "title": "撩你是认真的!@抖音小助手",
              "category": "舞蹈/舞蹈教学",
              "tags": "付费 gg",
              "interests": "POI娱乐_舞蹈教程,POI艺术_舞蹈",
              "tid": "T1480416235226",
              "wemediaId": "W2591355067903397690",
              "sourceName": "caigen",
              "publishTime": "2018-07-02 18:08:12"
    }
    
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "query" : {
        "bool" : {
          "must" : [
            {
              "term" : {
                "source" : {
                  "value" : 1,
                  "boost" : 1.0
                }
              }
            },
            {
              "range" : {
                "createTime" : {
                  "from" : "now-7d",
                  "to" : null,
                  "include_lower" : true,
                  "include_upper" : true,
                  "boost" : 1.0
                }
              }
            },
            {
              "term" : {
                "contentType" : {
                  "value" : 1,
                  "boost" : 1.0
                }
              }
            }
          ],
          "disable_coord" : false,
          "adjust_pure_negative" : true,
          "boost" : 1.0
        }
      },
      "aggregations" : {
        "createTime_aggs" : {
          "date_histogram" : {
            "field" : "createTime",
            "format" : "yyyy-MM-dd HH",
            "interval" : "1h",
            "offset" : 0,
            "order" : {
              "_key" : "asc"
            },
            "keyed" : false,
            "min_doc_count" : 0
          }
        }
      }
    }
    
       "aggs": {
          "sales": {
             "date_histogram": {
                "field": "createTime",
                "interval": "day", 
                "format": "yyyy-MM-dd" 
             }
          }
       }
    
    GET test/_mapping
    
    GET test/test/_search?routing=wemediaId
    {
      "query": {
        "match_all": {}
      }
    }
    
    GET /subscribe_content_manage/content_manage_info/D3PESFQ6051680TD?routing=W6580081252927125631
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "query" : {
        "term" : {
          "contentState" : {
            "value" : 2,
            "boost" : 1.0
          }
        }
      },
      "size": 0,
      "aggregations" : {
        "group_wemediaId" : {
          "terms" : {
            "field" : "wemediaId",
            
            "size" : 41,
            "min_doc_count" : 2,
            "shard_min_doc_count" : 0,
            "show_term_doc_count_error" : false,
            "order" : [
              {
                "_count" : "desc"
              },
              {
                "_term" : "asc"
              }
            ]
          }
        }
      }
    }
    
    PUT /subscribe_wemedia/_settings
    {
        "index" : {
            "refresh_interval" : "1s"
        }
    }
    
    GET /subscribe_wemedia/_settings
    
    GET subscribe_content_manage/_mapping
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "query":  {
        "match": {
          "wemediaId": 2
        }
      }
    }
    
    
    
    
    
    GET subscribe_wemedia_info/wemedia_info/_search
    {
      "query": {
        "match": {
          "userId": "boniutest4@163.com"
        }
      }
    }
    
    
    
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "query": {
        "match_all": {}
      }
    }
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "query": {
        "range": {
          "createTime": {
            "lte": "now-1h"
          }
        }
      }
    }
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "query": {
        "range": {
          "createTime": {
            "gte": "2018-01-11 12:55:00",
            "lte": "2018-01-11 21:55:00"
          }
        }
      }
    }
    
    GET .monitoring-es-2-2017.12.18/_search
    {
      "query": {
        "bool": {
          "must": [
            
               {
              "range": {
                "node_stats.thread_pool.search.queue": {
                  "gte": 0
                }
              }
            },
            {
              "range": {
                "timestamp": {
                  "gte":"now-500m"
                }
              }
            }
          ]
        }}}
    
    GET /.monitoring-es-2-2017.12.15/_search
    {
      "size": 200, 
      "query": {
        "range": {
          "node_stats.thread_pool.search.queue":{
            "gte": 1
            
          } 
        }
      }
      , "sort": [
        {
          "timestamp": {
            "order": "desc"
          }
        }
      ]
    }
    
    
    de /subscribe_content_manage/stats?pretty
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "query": {
        "match": {
          "articleId": "D6QMO45R051780A5"
        }
      }
    }
    
    GET subscribe_content_manage/_mapping
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "from" : 0,
      "size" : 10,
      "query" : {
        "bool" : {
          "must" : [
            {
              "term" : {
                "contentType" : {
                  "value" : 1,
                  "boost" : 1.0
                }
              }
            },
            {
              "term" : {
                "wemediaId" : {
                  "value" : "W568129291584031269",
                  "boost" : 1.0
                }
              }
            },
            {
              "term" : {
                "isDel" : {
                  "value" : 0,
                  "boost" : 1.0
                }
              }
            }
          ],
          "must_not" : [
            {
              "term" : {
                "contentState" : {
                  "value" : 0,
                  "boost" : 1.0
                }
              }
            }
          ],
          "disable_coord" : false,
          "adjust_pure_negative" : true,
          "boost" : 1.0
        }
      },
      "sort" : [
        {
          "createTime" : {
            "order" : "desc"
          }
        }
      ]
    }
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "query": {
        "match": {
          "articleId": "D6QMO45R051780A5"
        }
      }
    }
    
    GET /subscribe_content_manage/content_manage_info/D3PESFQ6051680TD?routing=W6580081252927125631
    
    GET subscribe_wemedia_info/wemedia_info/_search
    {
      "query": {
        "match": {
            "userId": {
                "query":"wangyiwenba030@163.com",
                "minimum_should_match": "100%"
            }
        }
      }
    }
    
    GET subscribe_video_material/video_material/_search
    {
      "from" : 0,
      "size" : 10,
      "query" : {
        "bool" : {
          "must" : [
            {
              "term" : {
                "wemediaId" : {
                  "value" : "W4211537089812971765",
                  "boost" : 1.0
                }
              }
            }
          ],
          "disable_coord" : false,
          "adjust_pure_negative" : true,
          "boost" : 1.0
        }
      },
      "sort" : [
        {
          "createTime" : {
            "order" : "desc"
          }
        }
      ]
    }
    
    POST /_xpack/security/user/jockbeat
    {
      "password" : "jockbeat",
      "full_name" : "jock beat",
      "email" : "john.doe@anony.mous",
      "roles" : [ "beats_admin" ]
    }
    
    GET subscribe_content_manage/_mapping
    
    GET subscribe_wemedia_info/wemedia_info/_search
    {
      
    "query": {
      "range": {
        "createTime": {
        
          "lte": "now",
          "time_zone": "Asia/Shanghai"
    
        }
      }
    }
    }
    
    
    
    GET subscribe_wemedia_info/wemedia_info/_search
    {
      "query": {
        "match_all": {}
      }
    }
    
    
    
    DELETE subscribe_comment
    GET subscribe_moparticle/_mapping
    GET /_cat/shards
    GET /_cluster/stats?pretty
    
    
    GET subscribe_wemedia/wemedia_info/_search
    {
      "query": {
        "match": {
          "wemediaId": "W5854357597708239041"
        }
      }
    }
    POST subscribe_wemedia/wemedia_info/W5854357597708239041/_update?routing=W5854357597708239041
    { 
       "script" : {
            "inline": "ctx._source.articleCount = ctx._source.creditLevel",
            "params" : {
                "count" : 1334,
                "remark":"12222"
            }
        }
    }
    
    PUT /my_index/_alias/my_index_2
    
    GET my_inde/my_type/_mapping
    GET /*/_alias/my_index_alias
    
    
    POST subscribe_wemedia/wemedia_info/_update_by_query?timeout=20000ms
    {
        "script" : {
            "inline": "ctx._source.testScript=0",
            "params" : {
                "count" : 5,
                "remark":"12233322"
            }
        },
      "query": {
        "match_all": {
        }
      }
    }
    
    
    
    POST subscribe_content_manage/content_manage_info/_update_by_query
    {
        "script" : {
            "inline": "ctx.op='delete'"
        },
      "query": {
        "bool": {
          "must": [
            {"match": {
              "wemediaId": "W6273030194652137237"
            }},{
              "match": {
                "contentType": "2"
              }
            }
          ]
        }
      }
    }
    
    POST my_index/my_type/_update_by_query
    {
        "script" : {
            "inline": "ctx._source.remove(\"remove_field\")"
        },
      "query": {
        "term": {
          "remove_field": 1
        }
      }
    }
    
    POST /my_index/my_type/1/_update
    {
        "script" : {
            "inline": "ctx._source.tags.contains(tag) ? ctx.op = \"delete\" : ctx.op = \"none\"",
            "params" : {
                "tag" : "blue"
            }
        }
    }
    
    POST /my_index/my_type/6/_update
    {
       "script" : "ctx._source.views+=1",
       "upsert": {
           "views": 1,
           "string_field":"new sore"
       }
    }
    
    POST /my_index/my_type/2/_update
    {
        "script" : "ctx._source.remove(\"remove_field\")"
    }
    
    
    POST /my_index/my_type/5/_update
    {
       "script" : {
            "inline": "ctx.op = (ctx._source.views == params.count )? 'delete' : 'none'",
            "params" : {
                "count" : 2
            }
        }
    }
    
    POST /my_index/my_type/1/_update
    {
       "script" : "ctx.op = ctx._source.views == 1 ? 'delete' : 'none'",
        "params" : {
            "count": 1
        }
    }
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      
      "query" : {
        "bool" : {
          "must" : [
            {
              "term" : {
                "source" : {
                  "value" : 1,
                  "boost" : 1.0
                }
              }
            },
            {
              "range" : {
                "createTime" : {
                  "from" : "now-7d",
                  "to" : null,
                  "include_lower" : true,
                  "include_upper" : true,
                  "boost" : 1.0
                }
              }
            }
          ],
          "disable_coord" : false,
          "adjust_pure_negative" : true,
          "boost" : 1.0
        }
      },
      "aggregations" : {
        "contentType" : {
          "value_count" : {
            "field" : "contentType"
          },
          "aggregations" : {
            "createTime" : {
              "date_histogram" : {
                "interval" : "1h",
                "offset" : 0,
                "order" : {
                  "_key" : "asc"
                },
                "keyed" : false,
                "min_doc_count" : 0
              }
            }
          }
        }
      }
    
    }
    
    POST subscribe_wemedia/wemedia_info/_update_by_query
    {
      "script": {
        "inline": "ctx._source.verifyPhone=\"\""
      },
      "query": {
        "term": {
          "verifyPhone": "17310034024"
        }
      }
    }
    
    POST subscribe_wemedia/wemedia_info/_update_by_query
    {
      "script": {
        "inline": "ctx._source.mcnFlag=1"
      },
      "query": {
        "match":{
          "wemediaId":"W4211537089812971765"
        }
      }
    }
    
    POST /subscribe_wemedia_info/wemedia_info/_mapping?pretty
    {
         "wemedia_info": {
                    "properties": {
     "videoAccountClassify": {
                "type": "integer"
              }            }
            }
    }
    
    POST subscribe_content_manage/content_manage_info/D34PUR84051780A5/_update?routing=W3331049950522949089
    {
          "doc": {
          "createTime": "2017-11-13 13:47:47"
        }
    }
    
    
    POST /subscribe_video_material/video_material/_mapping?pretty
    {
         "video_material": {
                    "properties": {
     "dramaName": {
                "type": "text",
                "fields": {
                  "en": {
                    "type": "text",
                    "analyzer": "english"
                  },
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                },
                "analyzer": "ik_smart"
              }            }
            }
    }
    
    GET /_nodes/process
    GET /_nodes/process?pretty
    
    GET /_cat/shards
    
    
    POST /_cluster/reroute
    {
            "commands" : [ {
                  "allocate" : {
                      "index" : "subscribe_content_manage",
                      "shard" : 5,
                      "node" : "xx2ebDkcScudtEz26QIKTQ",
                      "allow_primary" : true
                  }
                }
            ]
        }
        
        
    POST /_cluster/reroute
    {
      "commands": [
        {
          "allocate": {
            "index": "subscribe_content_manage",
            "shard": 0,
            "node": "xx2ebDkcScudtEz26QIKTQ",
            "allow_primary": true
          }
        }
      ]
    }
        PUT my_index/_settings
        {
          "number_of_replicas": 1
        }
        
        GET subscribe_content_manage/_mapping
        
        
    POST /_cluster/reroute
    {
        "commands" : [
            {
                "move" : {
                    "index" : "subscribe_wemedia", "shard" : 3,
                    "from_node" : "bjyz-subscribe-nginx-4", "to_node" : "bjyz-nc-elktest1"
                }
            }
        ]
    }
    
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      
      "from" : 0,
      "size" : 20,
      "query" : {
      "bool" : {
        "must" : [
        
          {
            "exists" : {
              "field" : "logInfo"
            }
          }
        ],
        "disable_coord" : false,
        "adjust_pure_negative" : true,
        "boost" : 1.0
      }
    }
    }
    
    POST subscribe_wemedia/wemedia_info/_update_by_query
    {
      "script": {
        "inline": "ctx._source.mcnFlag=1"
      },
      "query": {
        
        "match":{
          "wemediaId":"W5827704775633975749"
        }
      }
    }
    
    GET /subscribe_content_manage/content_manage_info/_search
    {
       "size" : 0,
       "aggs": {
          "sales": {
             "date_histogram": {
                "field": "createTime",
                "interval": "day", 
                "format": "yyyy-MM-dd" 
             }
          }
       }
    }
    
    POST subscribe_wemedia_info/wemedia_info/_update_by_query
    {
      "script": {
        "inline": "ctx._source.articleCount+=1;ctx._source.lastPublishTime='2018-01-12 15:34:37'"
      },
      "query": {
        "match": {
          "wemediaId": "W2240354508151476015"
        }
      }
    }
    
    GET subscribe_wemedia/wemedia_info/_search
    {
      
      "from" : 0,
      "size" : 20,
      "query" : {
        "bool" : {
          "must" : [
            {
              "match" : {
                "tname" : {
                  "query" : "虎嗅网",
                  "operator" : "OR",
                  "prefix_length" : 0,
                  "max_expansions" : 50,
                  "fuzzy_transpositions" : true,
                  "lenient" : false,
                  "zero_terms_query" : "NONE",
                  "boost" : 1.0
                }
              }
            },
            {
              "nested" : {
                "query" : {
                  "bool" : {
                    "must" : [
                      {
                        "term" : {
                          "mcn.contractState" : {
                            "value" : 1,
                            "boost" : 1.0
                          }
                        }
                      },
                      {
                        "term" : {
                          "mcn.mainWemediaId" : {
                            "value" : "W4211537089812971765",
                            "boost" : 1.0
                          }
                        }
                      }
                    ],
                    "disable_coord" : false,
                    "adjust_pure_negative" : true,
                    "boost" : 1.0
                  }
                },
                "path" : "mcn",
                "ignore_unmapped" : false,
                "score_mode" : "avg",
                "boost" : 1.0
              }
            }
          ]
      }
    }
    }
    
    
    DELETE /subscribe_wemedia/wemedia_info/W2220536374439332037?routing=W2220536374439332037
    
    
    GET subscribe_customer_v1
      
    PUT /subscribe_customer_v1/_alias/subscribe_customer
        
    GET /subscribe_wemedia/wemedia_info/_search
    {
     "query": {
       "match_all": {}
     }
    }
    
    
    POST _reindex
    {
      "source": {
        "index": "twitter",
        "type": "tweet",
        "query": {
          "term": {
            "user": "kimchy"
          }
        }
      },
      "dest": {
        "index": "new_twitter"
      }
    }
    
    POST /_aliases
    {
    "actions": [
    { "remove": { "index": "subscribe_wemedia_info", "alias": "subscribe_wemedia" }},
    { "add": { "index": "subscribe_wemedia_info_v2", "alias": "subscribe_wemedia" }}
    ]
    }
    
    
    
    POST _reindex
    {
      "source": {
        "index": "subscribe_wemedia_info",
        "type": "wemedia_info",
        "_source": ["wemediaId", "userId","accountQuality","accountType","articleCount","articleCountMonthly","auditingPunishmentCount","categoryIds","cid","cname","createTime","creditLevel","integral","isShareIncome","isVip","lastPublishTime","liveApplyState","liveApplyTime","local","localCity","localProvince","mcn","mcnFlag","mediaTag","newVideoQuality","onlineOptime","onlineState","originalApplyState","originalApplyTime","originalFlag","originalTime","ownerType","preAuditState","preAuditor","preQuality","preVideoQuality","punishmentCount","pushApplyState","pushApplyTime","refuseCount","shortNewsFlag","star","tid","tname","topicId","userIdPrefix","userIdcard","verifyPhone","videoAccountClassify","videoQuality","upTime"]
      },
      "dest": {
        "index": "subscribe_wemedia_info_v2",
        "type": "wemedia_info"
      }
    }
    
    
    GET subscribe_wemedia/_mapping
    
    POST /_aliases
    {
        "actions": [
            { "remove": { "index": "subscribe_wemedia_info", "alias": "subscribe_wemedia" }},
            { "add":    { "index": "subscribe_wemedia_info_v2", "alias": "subscribe_wemedia" }}
        ]
    }
    
    GET subscribe_wemedia_info_v2/_mapping
    
    GET subscribe_wemedia_info_v2/wemedia_info/_search
    {
      "query": {
        "match": {
          "mcn.contractState": 
        }
      }
    }
    
    GET subscribe_video_material/_mapping
    
    
    POST /subscribe_wemedia_info_v2/wemedia_info/_mapping?pretty
    {
         "wemedia_info" : {
                    "properties": {
      "auditBlackAddTime": {
                "type": "date",
                "format": "yyyy-MM-dd HH:mm:ss"
              }          }
            }
    }
    
    POST /subscribe_wemedia_info_v2/wemedia_info/_mapping?pretty
    {
         "wemedia_info" : {
                    "properties": {
      "blackType": {
                "type": "integer"
              }          }
            }
    }
    
    
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "from" : 0,
      "size" : 20,
      "query" : {
        "bool" : {
          "must" : [
            {
              "term" : {
                "contentType" : {
                  "value" : 1,
                  "boost" : 1.0
                }
              }
            },
            {
              "range" : {
                "createTime" : {
                  "from" : "2017-01-01 00:00:00",
                  "to" : "2018-05-11 00:00:00",
                  "include_lower" : true,
                  "include_upper" : true,
                  "boost" : 1.0
                }
              }
            },
            {
              "term" : {
                "wemediaId" : {
                  "value" : "W5359769653144763125",
                  "boost" : 1.0
                }
              }
            },
            {
              "term" : {
                "isDel" : {
                  "value" : 0,
                  "boost" : 1.0
                }
              }
            },
            {
              "term" : {
                "originalState" : {
                  "value" : 1,
                  "boost" : 1.0
                }
              }
            }
          ],
          "must_not" : [
            {
              "term" : {
                "copyCount" : {
                  "value" : -1,
                  "boost" : 1.0
                }
              }
            },
            {
              "range" : {
                "copyCount" : {
                  "from" : 0,
                  "to" : null,
                  "include_lower" : false,
                  "include_upper" : true,
                  "boost" : 1.0
                }
              }
            }
          ],
          "disable_coord" : false,
          "adjust_pure_negative" : true,
          "boost" : 1.0
        }
      },
      "sort" : [
        {
          "publishTime" : {
            "order" : "desc"
          }
        }
      ]
    }
    
    POST subscribe_content_manage/content_manage_info/_update_by_query?timeout=100s
    {
      "script": {
        "inline": "ctx._source.copyCount=1"
      },
      "query": {
        "terms": {
              "articleId": [
               "DO7JH2F5053089C4"
              ]
            }
      }
    }
    
    
    
    
    GET subscribe_video_material/video_material/_search
    {
      
      "query": {
        "bool": {
          "must": [
            {
              "match": {
                "videoId": "VUJ8SCJ7H"
              }
            }
          ]
        }
      },
      "sort": [
        {
          "createTime": {
            "order": "desc"
          }
        }
      ]
    }
    
    PUT /subscribe_wemedia_info_v2
    {
        "settings": {
            "number_of_shards": 6,
            "number_of_replicas": 1
        },
        "mappings": {
            "wemedia_info": {
            "dynamic": "false",
            "_all": {
              "enabled": false
            },
            "properties": {
              "accountQuality": {
                "type": "integer"
              },
              "accountType": {
                "type": "integer"
              },
              "articleCount": {
                "type": "long"
              },
              "articleCountMonthly": {
                "type": "long"
              },
              "auditingPunishmentCount": {
                "type": "long"
              },
              "categoryIds": {
                "type": "keyword"
              },
              "cid": {
                "type": "keyword"
              },
              "cname": {
                "type": "keyword"
              },
              "createTime": {
                "type": "date",
                "format": "yyyy-MM-dd HH:mm:ss"
              },
              "creditLevel": {
                "type": "integer"
              },
              "integral": {
                "type": "integer"
              },
              "isShareIncome": {
                "type": "integer"
              },
              "isVip": {
                "type": "integer"
              },        
              "lastPublishTime": {
                "type": "date",
                "format": "yyyy-MM-dd HH:mm:ss"
              },
              "liveApplyState": {
                "type": "integer"
              },
              "liveApplyTime": {
                "type": "date",
                "format": "yyyy-MM-dd HH:mm:ss"
              },
              "local": {
                "type": "integer"
              },
              "localCity": {
                "type": "keyword"
              },
              "localProvince": {
                "type": "integer"
              },
              "mcn": {
                "type": "nested",
                "properties": {
                  "contractId": {
                    "type": "keyword"
                  },
                  "contractState": {
                    "type": "integer"
                  },
                  "mainWemediaId": {
                    "type": "keyword"
                  }
                }
              },
              "mcnFlag": {
                "type": "integer"
              },
              "mediaTag": {
                "type": "integer"
              },
              "newVideoQuality": {
                "type": "integer"
              },
              "onlineOptime": {
                "type": "date",
                "format": "yyyy-MM-dd HH:mm:ss"
              },
              "onlineState": {
                "type": "integer"
              },
              "originalApplyState": {
                "type": "integer"
              },
              "originalApplyTime": {
                "type": "date",
                "format": "yyyy-MM-dd HH:mm:ss"
              },
              "originalFlag": {
                "type": "integer"
              },
              "originalTime": {
                "type": "date",
                "format": "yyyy-MM-dd HH:mm:ss"
              },
              "ownerType": {
                "type": "integer"
              },
              "preAuditState": {
                "type": "integer"
              },
              "preAuditor": {
                "type": "integer"
              },
              "preQuality": {
                "type": "integer"
              },
              "preVideoQuality": {
                "type": "integer"
              },
              "punishmentCount": {
                "type": "long"
              },
              "pushApplyState": {
                "type": "integer"
              },
              "pushApplyTime": {
                "type": "date",
                "format": "yyyy-MM-dd HH:mm:ss"
              },
               "upTime": {
                "type": "date",
                "format": "yyyy-MM-dd HH:mm:ss"
              },
              "refuseCount": {
                "type": "long"
              },
              "shortNewsFlag": {
                "type": "integer"
              },
              "star": {
                "type": "integer"
              },
              "tid": {
                "type": "keyword",
                "store": true 
              },
              "tname": {
                "type": "text",
                "fields": {
                  "en": {
                    "type": "text",
                    "analyzer": "english"
                  },
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                },
                "analyzer": "ik_smart"
              },
              "topicId": {
                "type": "keyword"
              },
              "userId": {
                "type": "keyword",
                "store": true 
              },
              "userIdPrefix": {
                "type": "keyword"
              },
              "userIdcard": {
                "type": "keyword"
              },
              "verifyPhone": {
                "type": "keyword"
              },
              "videoAccountClassify": {
                "type": "integer"
              },
              "videoQuality": {
                "type": "integer"
              },
              "wemediaId": {
                "type": "keyword",
                "store": true 
              }
            }
          }
        }  
    }    
    
    
    GET /_cluster/stats?pretty
    GET custom/_mapping
    
    PUT /subscribe_recommend_info_v1/_alias/subscribe_recommend_info
    
    PUT /subscribe_recommend_info_v1
    {
        "settings": {
            "number_of_shards": 6,
            "number_of_replicas": 1
        },
        "mappings": {
            "recommend_info": {
            "dynamic": "false",
            "_all": {
              "enabled": false
            },
            "properties": {
              "docid": {
                "type": "keyword"
              },
              "contentType": {
                "type": "integer"
              },
              "tid": {
                "type": "keyword"
              },
              "wemediaId": {
                "type": "keyword"
              },
              "publishTime": {
                "type": "date",
                "format": "yyyy-MM-dd HH:mm:ss"
              },
              "title": {
                "type": "text",
                "fields": {
                  "en": {
                    "type": "text",
                    "analyzer": "english"
                  },
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                },
                "analyzer": "ik_smart"
              },
              "tags": {
                "type": "text",
                "fields": {
                  "en": {
                    "type": "text",
                    "analyzer": "english"
                  },
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                },
                "analyzer": "ik_smart"
              },
              "interests": {
                "type": "text",
                "fields": {
                  "en": {
                    "type": "text",
                    "analyzer": "english"
                  },
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                },
                "analyzer": "ik_smart"
              },
               "sourceName": {
                "type": "text",
                "fields": {
                  "en": {
                    "type": "text",
                    "analyzer": "english"
                  },
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                },
                "analyzer": "ik_smart"
              },
              "category": {
                "type": "text",
                "fields": {
                  "en": {
                    "type": "text",
                    "analyzer": "english"
                  },
                  "keyword": {
                    "type": "keyword"
                  }
                },
                "analyzer": "ik_smart"
              }
            }
          }
        }
    }
        
        
    
    PUT /subscribe_customer_v1
    {
        "settings": {
            "number_of_shards": 6,
            "number_of_replicas": 1
        },
        "mappings": {
            "customer_doc": {
            "dynamic": "false",
            "_all": {
              "enabled": false
            },
            "properties": {
              "lspri": {
                "type": "integer"
              },
              "docid": {
                "type": "keyword"
              },
              "topicid": {
                "type": "keyword"
              },
              "ptime": {
                "type": "date",
                "format": "yyyy-MM-dd HH:mm:ss"
              },
              "title": {
                "type": "text",
                "fields": {
                  "en": {
                    "type": "text",
                    "analyzer": "english"
                  },
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                },
                "analyzer": "ik_smart"
              },
              "body": {
                "type": "text",
                "fields": {
                  "en": {
                    "type": "text",
                    "analyzer": "english"
                  },
                  "keyword": {
                    "type": "keyword"
                  }
                },
                "analyzer": "ik_smart"
              },
              "imgsrc": {
                "type": "keyword"
              },
              "url": {
                "type": "keyword"
              }
            }
          }
        }
    }
        
        
    
        GET _cluster/settings
    GET /_cat/shards
    GET /?pretty
    GET /_settings
    GET /_stats/search?level=shards
    
    GET /_cluster/stats?pretty
    GET /_stats
    GET /_nodes/stats?pretty
    
    GET subscribe_content_manage/_stats
    
    GET subscribe_wemedia/_mapping
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "version": true, 
      "query": {
        "match": {
          "isDel": "1"
        }
      },
      "sort": [
        {
          "createTime": {
            "order": "desc"
          }
        }
      ]
    }
    
    
    GET subscribe_content_manage/_mapping
    
    GET subscribe_picture_material/picture_material/_search
    {
      "query": {
        "match_all": {}
        
      }
    }
    
    GET subscribe_comment/_mapping
    
    GET /_nodes/stats
    
    GET subscribe_recommend_info/recommend_info/_search
    {
      "size": 40, 
      "query": { 
      "bool" : {
        "must" : [
          {
            "bool" : {
              "should" : [
                {
                  "match" : {
                    "title" : {
                      "query" : "宇宙",
                      "operator" : "AND",
                      "analyzer" : "ik_smart",
                      "prefix_length" : 0,
                      "max_expansions" : 50,
                      "fuzzy_transpositions" : true,
                      "lenient" : false,
                      "zero_terms_query" : "NONE",
                      "boost" : 9.0
                    }
                  }
                },
                {
                  "match" : {
                    "title.en" : {
                      "query" : "宇宙",
                      "operator" : "AND",
                      "analyzer" : "english",
                      "prefix_length" : 0,
                      "max_expansions" : 50,
                      "fuzzy_transpositions" : true,
                      "lenient" : false,
                      "zero_terms_query" : "NONE",
                      "boost" : 1.0
                    }
                  }
                }
              ],
              "disable_coord" : false,
              "adjust_pure_negative" : true,
              "minimum_should_match" : "1",
              "boost" : 1.0
            }
          },
          {
            "range" : {
              "publishTime" : {
                "from" : "2017-09-06 00:00:00",
                "to" : "2018-09-06 17:06:40",
                "include_lower" : true,
                "include_upper" : true,
                "boost" : 1.0
              }
            }
          }
        ],
        "disable_coord" : false,
        "adjust_pure_negative" : true,
        "boost" : 1.0
      }
    }
    }
    
    GET subscribe_wemedia/wemedia_info/_search
    {
    "query": {
      "bool": {
        "must": [
          {
      "match": {
        "onlineState": "2"
      }
    },{
      "terms": {
        "star": [
          "0",
          "1","2","3","4","5","-2"
        ]
      }
      },{
            "terms" : {
              "accountType" : [
                0,
                1
              ],
              "boost" : 1.0
            }
          }
        ]
      }
    }
    
    }
    GET subscribe_recommend_info/recommend_info/_search
    {
      "query": {
        "match_all": {}
      },
      "sort": [
        {
          "publishTime": {
            "order": "desc"
          }
        }
      ]
    }
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "version": true, 
      "query": {
        "match": {
          "skipId": "VPRIJUHA5"
        }
        
      }
    }
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "version": true,
      "size": 10, 
      "query": {
        "bool": {
          "must": [
              {
              "match": {
                "source": "1"
              }
            },{
              "match": {
                "contentType": 1
              }
            },{
              "range": {
                "createTime": {
                  "gte": "2018-09-25 00:00:00",
                  "lte":  "2018-09-26 00:00:00"
                }
              }
            }
          ]
        }
      }
    }
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "size": 1000, 
      "stored_fields": [], 
      "query": {
        "bool": {
          "must": [
            {
              "match": {
                "scheduledState": 1
              }
            },{
              "match": {
                "contentState":3
              }
            },{
              "match": {
                "contentType":2
              }
            },{
              "range": {
                "publishTime": {
                
                  "lte": "2018-09-10 14:10:00"
                }
              }
            }
              
              
            
          ]
        }
      }
    }
    
    GET /subscribe_content_manage/content_manage_info/_search
    {
        "query" : {
          
        "bool": {
          "must": [
            {
              "match": {
                "scheduledState": 1
              }
            },{
              "match": {
                "contentState":3
              }
            },{
              "match": {
                "contentType":2
              }
            }
        
      
          ]
        }
      
        },
       "size" : 100,
       "aggs": {
          "sales": {
             "date_histogram": {
                "field": "createTime",
                "interval": "hour", 
                "format": "yyyy-MM-dd hh" 
             }
          }
       },
       "sort": [
         {
           "createTime": {
             "order": "desc"
           }
         }
       ]
    }
    
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "stored_fields": [], 
      "size": 100, 
      "query": {
        
        "bool": {
          "must": [
            {
              "match": {
                "scheduledState": 1
              }
            },{
              "match": {
                "contentState":3
              }
            },{
              "match": {
                "contentType":2
              }
            },{
              "range": {
                "publishTime": {
                
                  "lte": "2018-09-10 14:15:00"
                }
              }
            }
              
      
          ]
        }
      
        }
    }
    
    GET subscribe_picture_material/picture_material/_search
    {
      "query": {
        "match_all": {}}
    }
    GET subscribe_content_manage/content_manage_info/_search
    {
      "size": 1, 
      "query": {
        "bool": {
          "must": [
            {
              
        "range": {
          "createTime": {
            "gte": "2018-05-12 00:00:00",
            "lte": "2018-05-13 00:00:00"
          }
        }
      
            },
            {
              "match": {
                "contentType": "1"
              }
            },{
              "match": {
                "source": "2"
              }
            },{
              "match": {
                "contentState": "3"
              }
            }
          ]
        }
      }
    }
    
    GET subscribe_picture_material/picture_material/_search
    {
      "query": {
        "match": {
          "watermarkUrl": "http://crawl.nosdn.127.net/f8e0b14feebb72525180e4613d0bd646.png"
        }}
    }
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "size": 200, 
      "version": true, 
      "query": {
        "match": {
          "picUrl": "[object Object]"
        }
      },
      "sort": [
        {
          "createTime": {
            "order": "desc"
          }
        }
      ]
    }
    GET subscribe_wemedia/_mapping
    
    GET subscribe_wemedia/wemedia_info/_search
    {
      "query": {
        "nested": {
          "path": "mcn",
          "query": {
            "match": {
              "mcn.contractState": "1"
            }
          }
        }
      }
    }
    
    GET subscribe_moparticle/moparticle/_search
    {
      "version": true, 
      "query": {
        "match": {
          "docid": "DN1OCN2F05198DBD"
        }
      }
    }
    
    POST /subscribe_wemedia/wemedia_info/_mapping?pretty
    {
         "wemedia_info" : {
                    "properties": {
      "middleQualityType": {
                "type": "integer"
              }          }
            }
    }
    
    
    GET subscribe_short_news/short_news_info/_search
    {
      "query": {
        "match": {
          "docId": "DN1OCN2F05198DBD"
        }
      }
    }
    
    GET /_cat/shards
    GET /_settings
    GET subscribe_content_manage/_mapping
    
    GET subscribe_wemedia/wemedia_info/_search
    {
      "size": 0, 
      "query": {
        "bool": {
          "must": [
            {
              "match": {
                "contentType": "1"
              }
            },{
              "match": {
                "source": "2"
              }
            },{
              "match": {
                "contentState": "3"
              }
            }
          ]
    }
      },
      "aggregations" : {
        "group_wemediaId" : {
          "terms" : {
            "field" : "createTime",
            "size" : 10,
            "shard_min_doc_count" : 2,
            "show_term_doc_count_error" : false,
            "order" : [
              {
                "_count" : "desc"
              }
            ]
          }
        }
      }
    }
    
    GET subscribe_wemedia/wemedia_info/_search
    {
      "query": {
        "range": {
          "createTime": {
            "gte": "2018-05-07 18:00:00"
            
          }
        }
      }
    }
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "size": 1, 
      "query": {
        "bool": {
          "must": [
            {"term": {
              "contentState": {
                "value": 3
              }
            }},{
              "term": {
                "wemediaId": {
                  "value": "W600545558240447640"
                }
              }
            }
          ]
        }
    
      },
      "sort": [
        {
          "publishTime": {
            "order": "desc"
          }
        }
      ]
    }
    
    
    GET subscribe_video_material/video_material/_search
    {
      "version": true, 
      "query": {
        "bool": {
          "must": [
            {
              "term": {
                "videoId": {
                  "value": "VZG95BFC8"
                }
              }
            },
            {
              "term": {
                "videoState": {
                  "value": "5"
                }
              }
            }
            
          ]
        }
      }
    }
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "query": {
        "bool": {
          "must": [
            {
              "range": {
                "createTime": {
                  "gte": "now-1d"
                
                }
              }
            }
          
          ],
          "must_not": [
            {
              "exists":{
          "field" : "sourceInfos"
        } 
            }
          ]
        }
      }
    }
    
    
    GET subscribe_wemedia/wemedia_info/_search
    {
      "query": {
         "exists":{
          "field" : "articleCountMonthly"
        } 
      }
    }
    GET subscribe_video_material/video_material/_search
    {
      "version": true, 
      "query": {
        "match": {
          "videoId": "VQEP9TI02"
        }
      }
    }
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "version": true, 
      "size": 300, 
      "query": {
       "match": {
         "articleId": "DI37VKO00517A4NQ"
       }
      }
    }
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "version": true, 
      "size": 400, 
      "query": {
        "match": {
          "wemediaId": "W3689168482563240493"
        }
      }
    }
    
    
    
    
    
    
    GET /subscribe_content_manage/content_manage_info/_search
    {
      "query": {
        "bool": {
          "must": [
            {
              "term": {
                "contentType": {
                  "value": "1"
                }
              }
            }
          ],
          "should": [
            
              {
              "range": {
                "createTime": {
                  "gte": "2018-02-28 00:00:00",
                  "lte": "2018-02-28 00:01:00"
                }
              }
            
            },
            {
              "range": {
                "createTime": {
                  "gte": "2018-02-28 00:01:00",
                  "lte": "2018-02-28 00:02:00"
                }
              }
            
            }
          ],
          "minimum_number_should_match": 1
        }
      }
    }
    
    
    
    GET subscribe_wemedia/wemedia_info/_search
    {
      "query": {
        "match": {
          "wemediaId": "W3689168482563240493"
        }
      }
    }
    
    GET subscribe_video_material/video_material/_search
    {
      "query": {
        "match": {
          "videoId": "VECBM1V9P"
        }
      }
    }
    
    GET subscribe_video_material/video_material/_search
    {
      "size": 1000, 
      "query": {
        "match": {
          "videoId": "VGD078R7B"
        }
      }
    }
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "version": true, 
      "query": {
        "match": {
          "skipId": "VCGUBOCE6"
        }
      }
    }
    
    
    
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "query": {
        "bool": {
          "must": [
            {
              "match": {
                "scheduledState": 1
              }
            
            },{
              "range": {
                "createTime": {
                  "gte": "now-2d"
                  
                }
              }
            },{
              "match": {
                "contentState": 3
              }
            },{
              "match": {
                "contentType": 2
              }
            }
          ]
        }
      }
    }
    
    
    
    
    
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "query": {
        "match": {
          "": "二次元"
        }
      }
    }
    
    
    POST subscribe_content_manage/content_manage_info/DQQ038LF05148UCS/_update?routing=W845957065702486906
    {
    "doc": {
      "contentState": 3
    }
    }
    
    
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "query": {
        
        "bool": {
          "must": [
            {
              "match": {
                "contentType": 3
              }
            },{
              "match": {
                "contentState": 4
              }
            }
          ]
        }
      },
      "sort": [
        {
          "createTime": {
            "order": "desc"
          }
        }
      ]
    }
    
    GET subscribe_video_material/video_material/VC7TUE21G?routing=W3759410337840806590
    
    GET subscribe_wemedia_info/wemedia_info/_search
    {
      "query": {
        "range": {
          "upTime": {
            "gte": "2018-01-25 19:00:00"
             
          }
        }}
    }
    
    
    GET subscribe_wemedia_info/_mapping
    
    
    GET subscribe_wemedia_info/wemedia_info/_search
    {
      "size": 1000, 
      "query": {
        "bool": {
          "must": [
            {
              "range": {
              "createTime": {
                "gte": "2017-12-01 00:00:00"
                
              }
            }},
            {
             "exists":{
          "field" : "preVideoQualityRemark"
        } 
            }
          ]
        }
        
      }
    }
    
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "query": {
        "match": {
          "articleId": "BUN9K7S30517A3TC"
        }
      }
    }
    
    GET subscribe_content_manage/_mapping
    
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "query": {
        "bool": {
          "must": [
            {
              "term": {
                "source": {
                  "value": 1
                }
              }
            },
          {
            "match": {
              "wemediaId": "W4109380605596878771"
            }
          },
          {
            "range": {
              "createTime": {
                "gte": "2018-01-31 00:00:00",
                  "lte": "2018-01-31 23:59:59"
              }
            }
          }
          ]
        }
        
      }
    }
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "query": {
        "match": {
          "wemediaId": "W3408729843981567552"
        }
      }
    }
    
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "size": 1, 
      "query" : {
        "bool": {
          "must": [
            {
              "range": {
                "publishTime": {
                  "gte": "now-2d+8h"
                }
              }
            },
            {
              "term": {
                "contentState": {
                  "value": "3"
                }
              }
            }
          ]
        }
      },
      "aggregations" : {
        "group_wemediaId" : {
          "terms" : {
            "field" : "wemediaId",
            "size" : 20000,
            "shard_min_doc_count" : 1,
            "show_term_doc_count_error" : false,
            "order" : [
              {
                "_count" : "desc"
              }
            ]
          }
        }
      }
    }
    
    
    POST /subscribe_content_manage/content_manage_info/_search
    {
       "query": {
         "match": {
           "contentState": 2
         }
       },
       "aggs": {
         "sum_age": {
           "aggs": {
             "field": "wemediaId"
           }
         }
       }
     }
     
     POST /subscribe_content_manage/content_manage_info/_search
    {
       "query": {
         "bool": {
           "must": [
             {"range": {
               "createTime": {
                 "gte": "2018-04-09 08:00:00"
               }
             }
             },{
               "term": {
                 "contentType": {
                   "value": 1
                 }
               }
             }
           ]
         }
       },
       "size": 0, 
       "aggregations" : {
        "group_wemediaId" : {
          "terms" : {
            "field" : "sourceInfos",
            "size": 110, 
            "min_doc_count" : 10,
            "shard_min_doc_count" : 0,
            "show_term_doc_count_error" : false,
            "order" : [
              {
                "_count" : "desc"
              },
              {
                "_term" : "asc"
              }
            ]
          }
        }
      }
     }
    
    
    POST /subscribe_wemedia_info/wemedia_info/W829402688092193565/_update
    {"script": "ctx._source.articleCount+=1;ctx._source.lastPublishTime='2018-01-15 17:36:12'"}
    
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "query": {
      "bool" : {
        "must" : [
          {
            "terms" : {
              "accountQuality" : [
                3,
                4,
                6
              ],
              "boost" : 1.0
            }
          },
          {
            "range" : {
              "wemediaId" : {
                "from" : null,
                "to" : "W4170477283439326936",
                "include_lower" : true,
                "include_upper" : false,
                "boost" : 1.0
              }
            }
          }
        ],
        "must_not" : [
          {
            "range" : {
              "lastPublishTime" : {
                "from" : "2017-12-28 00:00:00",
                "to" : null,
                "include_lower" : false,
                "include_upper" : true,
                "boost" : 1.0
              }
            }
          }
        ],
        "disable_coord" : false,
        "adjust_pure_negative" : true,
        "boost" : 1.0
      }
    }
    }
    
    GET subscribe_wemedia_info/wemedia_info/_search
    {
      "query": {
      "bool" : {
        "must" : [
          {
            "terms" : {
              "accountQuality" : [
                3,
                4,
                6
              ],
              "boost" : 1.0
            }
          }
        ],
        "must_not" : [
          {
            "range" : {
              "lastPublishTime" : {
                "from" : "2017-12-28 00:00:00",
                "to" : null,
                "include_lower" : false,
                "include_upper" : true,
                "boost" : 1.0
              }
            }
          }
        ],
        "disable_coord" : false,
        "adjust_pure_negative" : true,
        "boost" : 1.0
      }
    }
    }
    
    GET subscribe_moparticle/moparticle/_search
    {
      "size" : 5,
      "query" : {
        "bool" : {
          "must" : [
            {
              "term" : {
                "MCNMainWemediaId" : {
                  "value" : "W7704159671476598661",
                  "boost" : 1.0
                }
              }
            },
            {
              "term" : {
                "contentType" : {
                  "value" : 1,
                  "boost" : 1.0
                }
              }
            },
            {
              "term" : {
                "del" : {
                  "value" : 0,
                  "boost" : 1.0
                }
              }
            },
            {
              "range" : {
                "ptime" : {
                  "from" : "2018-05-16 00:00:00",
                  "to" : null,
                  "include_lower" : true,
                  "include_upper" : true,
                  "boost" : 1.0
                }
              }
            }
          ],
          "must_not" : [
            {
              "terms" : {
                "docid" : [
                  "DHU5160H0514CFC7",
                  "DHU5QEHR0514CFC7"
                ],
                "boost" : 1.0
              }
            }
          ],
          "disable_coord" : false,
          "adjust_pure_negative" : true,
          "boost" : 1.0
        }
      },
      "sort" : [
        {
          "docid" : {
            "order" : "desc"
          }
        }
      ]
     
    }
    GET subscribe_content_manage/content_manage_info/_search
    {
      "size": 100, 
      "query": {"bool": {
        "must": [
          {
            "match": {
              "contentType": 2
            }
          },{
            "range": {
              "createTime": {
                "gte": "2018-06-28 00:00:00",
                "lte": "2018-07-07 00:00:00"
              }
            }
          },{
            "match": {
              "contentState": 3
            }
          },{
            "terms": {
              "wemediaId": [""]
            }
          }
        ]
      }}
    }
    
    
    
    GET subscribe_wemedia_info/wemedia_info/_search
    {
      "query": {
              
            "exists" : {
              "field" : "lastPublishTime"
            }
            }
    }
    
    GET subscribe_content_manage/_mapping
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "query": {
        "match": {
          "wemediaId": "W1002122328685133068"
        }
      }
    }
    
    
    GET subscribe_wemedia_info/wemedia_info/_search
    {
      "query": {
        "match": {
          "wemediaId": "W5151524052450231709"
        }
      }
    }
    
    GET subscribe_wemedia_info/wemedia_info/_search
    {
      "query": {
        "match": {
          "wemediaId": "W2908079050101142908"
        }
      }
    }
    
    GET subscribe_wemedia_info/wemedia_info/_search
    {
      "query": {
        "bool": {
          "must": [
            {
              "match": {
                "videoAccountClassify": 0
              }},{
                "range": {
                  "createTime": {
                    "gte": "now-8d"
                    
                  }
                }
              }
              
          ]
        }
      }
    }
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "query": {
        "bool": {
          "must": [
            {
              "range": {
                "createTime": {
                  "gte": "2017-12-22 00:00:00"
                }
              }
            }
          ],
          "must_not": [
            {
              
            "exists" : {
              "field" : "source"
            }
          
            }
          ]
        }
      }
    }
    
    GET .monitoring-kibana-2-2017.12.15/_search
    {
      "size": 1000, 
      "query": {
        "match": {
          "kibana_stats.requests.total": "4"
        }
      }
    }
    
    GET .monitoring-es-2-2017.12.18/_search
    {
      "query": {
        "bool": {
          "must": [
            
               {
              "range": {
                "node_stats.thread_pool.search.queue": {
                  "gte": 100
                }
              }
            },
            {
              "range": {
                "timestamp": {
                  "gte": "now-70m"
                }
              }
            }
          
            
          ]
        }}
      , "sort": [
        {
          "timestamp": {
            "order": "desc"
          }
        }
      ]
    }
          
    GET /.monitoring-es-2-2017.12.18/_search
    {
      "size": 200, 
      "query": {
        "range": {
          "node_stats.thread_pool.search.rejected":{
            "gt": 1
            
          } 
        }
      }
      , "sort": [
        {
          "timestamp": {
            "order": "desc"
          }
        }
      ]
    }
    GET /
    
    GET _cat/thread_pool
    
    GET /.monitoring-es-2-2017.12.15//
    {
      "size": 200, 
      "query": {
        "match_all": {}
      }
      , "sort": [
        {
          "timestamp": {
            "order": "desc"
          }
        }
      ]
    }
    GET /_cat/thread_pool
    
    GET /_cat/thread_pool/generic?v&h=name,queue_size
    
    GET /_nodes/stats?pretty
    
    GET .monitoring-kibana-2-2017.12.15/_search
    {
      "size": 1000, 
      "query": {
        "range": {
          "kibana_stats.requests.status_codes.404": {
            "gte": 1
          }
        }
      }
    }
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "size": 2000, 
      "query": {
        "match": {
          "contentType": "2"
        }
      }
    }
    
    GET subscribe_wemedia_info/wemedia_info/_search
    {
      "query": {
        "match": {
          "userId": "wangyiwenba030@163.com"
        }
      }
    }
    
    GET subscribe_moparticle/moparticle/_search
    {
      "query": {
        "match": {
          "MCNMainWemediaId": "W3178043340487870919"
        }
      }
    }
    
    POST /subscribe_content_manage/content_manage_info/_mapping?pretty
    {
         "content_manage_info": {
                    "properties": {
     "source": {
                "type": "integer"
              }            }
            }
    }
    
    GET subscribe_moparticle/moparticle/_search
    {
      "query": {
        "match": {
          "docid": "D4VGBTOO0517Q915"
        }
      }
    }
    
    GET subscribe_content_manage/content_manage_info/_search
    {
    
      "from" : 0,
      "size" : 200,
      "query" : {
      "bool" : {
        "must" : [
        
         
          {
        "match_phrase": {
            "title": {
                "query":"美剧"
            }
        }
      },
      {
        "match_phrase": {
            "title": {
                "query":"迅雷下载"
            }
        }
      }
        ],
        "disable_coord" : false,
        "adjust_pure_negative" : true,
        "boost" : 1.0
      }
    }
    }
    
    GET subscribe_wemedia_info/wemedia_info/_search
    {
      "query": {
        "bool": {
          "must": [
            {}
          ]
        }
      }
    }
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      
      "from" : 0,
      "size" : 20,
      "query" : {
      "bool" : {
        "must_not" : [
          
          {
            "exists" : {
              "field" : "isDel"
            }
          }
        ],
        "disable_coord" : false,
        "adjust_pure_negative" : true,
        "boost" : 1.0
      }
    }
    }
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "query": {
        "exists" : {
        "field" : "publishTime",
        "boost" : 1.0
      }
      }
    }
    
    GET /_xpack/security/user?pretty
    
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "from": 9000, 
      "query": {
        "match": {
          "articleId": "CV1ST4E005149E7P"
        }
      }
    }
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "size": 200, 
      "query": {
        "match": {
            "title": {
                "query":"鲁炜",
                "minimum_should_match": "100%"
            }
        }
      }
    }
    
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "query": {
        "match": {
          "wemediaId": "W6692523779434528312"
        }
      }
    }
    
    GET subscribe_wemedia_info/wemedia_info/_search
    {
      "query": {
        "match": {
          "videoAccountClassify": 1
        }
      }
    }
    
    
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "query": {
        "match": {
          "articleId": "D3EJKUD00517CCPO"
        }
      }
    }
    
    POST subscribe_wemedia/wemedia_info/_update_by_query
    {
      "script": {
        "inline": "ctx._source.verifyPhone=\"\""
      },
      "query": {
        "term": {
          "verifyPhone": "17310034024"
        }
      }
    }
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "query": {
          "match": {
            "skipId": "VY5QVUUSK"
          } 
          
      }
    }
    
    GET subscribe_wemedia_info/_mapping
    
    
    POST /subscribe_video_material/video_material/_mapping?pretty
    {
         "video_material": {
                    "properties": {
     "adState": {
                "type": "integer"
              }            }
            }
    }
    
    
    POST subscribe_wemedia_info/wemedia_info/W6879385333112327027/_update?routing=W6879385333112327027
    {
          "doc": {
          "pushFlag": 1
        }
    }
    
    POST subscribe_content_manage/content_manage_info/D3BRE76O0525QJMM/_update?routing=W7297224326040302785
    {
          "doc": {
          "contentState": 3
        }
    }
    
    
    POST subscribe_content_manage/content_manage_info/_update_by_query?timeout=10s
    {
      "script": {
        "inline": "ctx._source.publishTime=ctx._source.createTime"
      },
      "query": {
        "match":{
          "articleId":"D8UJ6NRV0514B91H"
        }
      }
    }
    
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "size": 50, 
      "query": {
        "match": {
          "articleId": "D8UJ6NRV0514B91H"
        }
      }
      , "sort": [
        {
          "createTime": {
            "order": "desc"
          }
        }
      ]
    }
    
    
    POST subscribe_content_manage/content_manage_info/_update_by_query
    {
        "script" : {
            "inline": "ctx._source.remove(\"logInfo\")"
        },
      "query": {
      "bool" : {
        "must" : [
          
         
          {
            "exists" : {
              "field" : "logInfo"
            }
          }
        ]
      }
    }
    }
    
    POST /subscribe_video_material/video_material/_mapping?pretty
    {
         "video_material": {
                    "properties": {
     "dramaName": {
                "type": "text",
                "fields": {
                  "en": {
                    "type": "text",
                    "analyzer": "english"
                  },
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                },
                "analyzer": "ik_smart"
              }            }
            }
    }
    
    POST subscribe_video_material/video_material/_update_by_query
    {
      "script": {
        "inline": "ctx._source.contentState=6"
      },
      "query": {
        "match_phrase": {
          "title": "n厂"
        }
      }
    }
    
    POST subscribe_wemedia_info/wemedia_info/W5151524052450231709/_update?routing=W5151524052450231709
    {
      "script": {
        "inline": "ctx._source.articleCount+=1;ctx._source.lastPublishTime='2018-01-15 17:50:37'"
      }
    
    }
    
    
    
    GET subscribe_wemedia_info/wemedia_info/_search
    {
      "query": {
        "terms": {
          "wemediaId": [
            "VALUE1",
            "VALUE2"
          ]
        }
      }
    }
    
    GET subscribe_wemedia_info/wemedia_info/_search
    {
      "query": {
        "match": {
          "wemediaId": "W4769777935566615040"
        }
      }
    }
    
    GET subscribe_wemedia/wemedia_info/_search
    {
      "query": {
      "bool" : {
        "must_not" : [
          
          {
            "exists" : {
              "field" : "middleQualityType"
            }
          }
        ],
        "disable_coord" : false,
        "adjust_pure_negative" : true,
        "boost" : 1.0
      }
    }
    }
    
    
    POST subscribe_wemedia/wemedia_info/_update_by_query?timeout=100s
    {
      "script": {
        "inline": "ctx._source.middleQualityType=0"
      },
      "query": {
      "bool" : {
        "must_not" : [
          
          {
            "exists" : {
              "field" : "middleQualityType"
            }
          }
        ],
        "disable_coord" : false,
        "adjust_pure_negative" : true,
        "boost" : 1.0
      }
    }
    }
    
    
    POST subscribe_content_manage/content_manage_info/_update_by_query?timeout=100s
    {
      "script": {
        "inline": "ctx._source.isDel=0"
      },
      "query": {
      "bool" : {
        "must_not" : [
          
          {
            "exists" : {
              "field" : "isDel"
            }
          }
        ],
        "disable_coord" : false,
        "adjust_pure_negative" : true,
        "boost" : 1.0
      }
    }
    }
    
    
    POST subscribe_content_manage/content_manage_info/_update_by_query?timeout=100s
    {
      "script": {
        "inline": "ctx._source.scheduledState=2"
      },
      "query": {
        
        "bool": {
          "must": [
            {
              "match": {
                "scheduledState": 1
              }
            },{
              "match": {
                "contentState":3
              }
            },{
              "match": {
                "contentType":2
              }
            },{
              "range": {
                "publishTime": {
                
                  "lte": "2018-09-18 16:55:00"
                }
              }
            }
              
      
          ]
        }
      
        }
    }
    
    POST subscribe_content_manage/content_manage_info/_update_by_query?timeout=100s
    {
      "script": {
        "inline": "ctx._source.contentState=3"
      },
     "query": {
        "terms": {
          "articleId": ["DSGDK3PG0520WCS2"]
        }
      }}
    
    
    GET subscribe_content_manage/content_manage_info/_search
    {
      "query": {
        "match": {
          "articleId": "DIDNOTDV0512T0N0"
        }}
    }
    
    
    
    GET subscribe_wemedia_info/wemedia_info/_search
    {
      "query": {
        "range": {
          "auditingPunishmentCount": {
            "gt": 0
          }
        }
      }
    }
    
    
    PUT /subscribe_wemedia/_settings
    {
        "index" : {
            "refresh_interval" : "5s"
        }
    }
    
    PUT /subscribe_video_material/_settings
    {
        "index" : {
            "refresh_interval" : "5s"
        }
    }
    
    
    
    POST /subscribe_wemedia_info/wemedia_info/_mapping?pretty
    {
         "wemedia_info": {
                    "properties": {
                     "mcn": {
              "type": "nested",
                    "properties":{  
                       "mainWemediaId":{"type":"keyword"},
                       "contractId":{"type":"keyword"},  
                       "contractState": {"type":"integer"}
                    } 
            }
                }
            }
    }
    
    
    POST subscribe_content_manage/content_manage_info/DL64VNIH0514S6VH/_update?routing=W6290760167325547871
    {
    "doc": {
    "title": "中宁枸杞,养生天下!!",
    "isShareIncome": 0,
    "integral": 0
    }
    }
    GET subscribe_content_manage/content_manage_info/_search
    {
      "query": {
        "match": {
          "articleId": "DRCDPJHQ055009QH"
        }
      }
    }
    
    GET subscribe_moparticle/moparticle/_search
    {
      "query": {
        "match": {
          "docid": "DL64VNIH0514S6VH"
        }
      }
    }
    
    POST subscribe_content_manage/content_manage_info/_update_by_query
    {
        "script" : {
            "inline": "ctx.op='delete'"
        },
      "query": {
        
        "bool": {
          "must": [
         
              {
              "match": {
                "articleId": "DRCDPJHQ055009QH"
              }
            }
          
          ]
        }
      
      }
    }
    
    GET subscribe_video_material/video_material/_search
    {
      "query": {
        "match": {
          "videoId": "VDQDM5IHG"
        }
      }
    }
    
    PUT /subscribe_recommend_info_v1/_alias/subscribe_recommend_info
    
    
    
    PUT /subscribe_comment_v1
    {
        "settings": {
            "number_of_shards": 6,
            "number_of_replicas": 1
        },
        "mappings": {
            "media_comment_info": {
            "dynamic": "false",
            "_all": {
              "enabled": false
            },
             "_routing": {
              "required": true
            },
            "properties": {
              
              "commentState": {
                "type": "integer"
              },
              "commentUpdateTime": {
                "type": "long"
              },
              "docId": {
                "type": "keyword"
              },
              "id": {
                "type": "long"
              },
              "publishTime": {
                "type": "long"
              },
              "readCommentCount": {
                "type": "long"
              },
              "title": {
                "type": "text",
                "fields": {
                  "en": {
                    "type": "text",
                    "analyzer": "english"
                  },
                  "keyword": {
                    "type": "keyword",
                    "ignore_above": 256
                  }
                },
                "analyzer": "ik_smart"
              },
              "topCommentId": {
                "type": "long"
              },
              "totalCommentCount": {
                "type": "long"
              },
              "type": {
                "type": "long"
              },
              "updateTime": {
                "type": "long"
              },
              "userId": {
                "type": "keyword"
              }
            
            }
          }
        }
    }
    
    
    curl -X PUT "10.122.63.206:9800/_template/template_elephant_cindex" -H 'Content-Type: application/json' -d'
    {
      "index_patterns": ["elephant_cindex_*"],
      "settings": {
        "number_of_shards": 24
      },
        "mappings": {
    
    
    

    相关文章

      网友评论

          本文标题:ES常用命令-项目中实际使用

          本文链接:https://www.haomeiwen.com/subject/rvtzmktx.html