• Elasticsearch语句整理


    并且或

    index/_search
    {
     "query": {
        "bool": {
           "must": [
             {
               "term": {
                 "storeId": {
                   "value": 2
                 }
               }
             }
           ], 
          "should": [
            {
              "match": {
              "title": "答题技巧"
            }
            },{
              "match": {
                "title": "常见问题解答"
              }
            }
          ]
        }
      }
    }

    //更新一条数据

    POST /index/_update_by_query
    {
    "query": {
    "term": {
    "_id": "b43d71d7ed6740ff9615885bae5f9e64"
    }
    },
    "script": {
    "lang": "painless",
    "source": "ctx._source.id = params.id",
    "params": {
    "id": "b43d71d7ed6740ff9615885bae5f9e64"
    }
    }
    }

  • 相关阅读:
    XJOI网上同步训练DAY2 T2
    XJOI网上同步训练DAY2 T1
    BZOJ 2661 连连看
    HDU 4411 Arrest
    BZOJ 2324 营救皮卡丘
    BZOJ 1927 星际竞速
    BZOJ 3550 Vacation
    XJOI网上同步训练DAY1 T3
    php 类的相互访问
    ThinkPhp5.0_文件上传
  • 原文地址:https://www.cnblogs.com/panjuan/p/14511957.html
Copyright © 2020-2023  润新知