【ElasticSearch】ES線上臟數據處理


 

ES分組

GET index_user_latest/_search
{
    "aggs": {
        "group_by_tags": {  
            "terms": {
                "field": "telNum",
                "size": 10
            }
        }
    }
}

多條件查詢

GET index_user_latest/_search
{
  "query": {
    "bool": {
      "must": [
        {
          "match": {
            "telNum": "13277040656"
          }
        }
      ],
      "must_not": [
        {
          "match": {
            "userId": 146540743
          }
        }
      ]
    }
}
}

條件刪除

POST index_user_latest/_delete_by_query
{
  "query": {
    "bool": {
      "must": [
        {
          "match": {
            "isDelete": true
          }
        }
      ]
    }
}
}

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM