zoukankan      html  css  js  c++  java
  • 复合查询

    复合查询

    • 将多个基本查询组合成单一查询的查询

      GET /lib2/user/_search
      {
         "query":{
             "bool":{
                 "must":{
                     "match":{"interests":"唱歌"}
                },
                 "must_not":{
                     "match":{"interests":"旅游"}
                },
                 "should":[
                    {"match":{"adress":"bei jing"}}
                ],
                 "filter":{
                     "range":{"birthday":{"gte":"1996-01-01"}}
                }
            }
        }
      }
    • constant_score查询:它将一个不变的常量评分应用于所有匹配的文档。它被经常用于你需要执行一个filter而没有其他查询(例如,评分查询)的情况下。

      GET /lib2/user/_search
      {
       "query": {
         "constant_score": {
           "filter": {
             "term": {
               "interests": "唱歌"
            }
          }
        }
      }
      }
  • 相关阅读:
    弹框定位
    多窗口切换
    frame嵌套页面元素的定位
    元素的等待
    键盘的操作
    鼠标的操作
    下拉列表框的选定定位
    Css定位元素
    依赖反射练习实例
    excel筛选两列值是否相同,如果相同返回第三列值
  • 原文地址:https://www.cnblogs.com/zxbdboke/p/10465793.html
Copyright © 2011-2022 走看看