Es中bool 查询中的四个(must must_not should filter)

1.must :相当于and
2.must_not :相当于not
3.should:相当于or
4. filter:过滤
gte 大于
gt大于
lte小于等于
lt小于
使用示例:

{
    “bool”:{
        “must”:{“match”:{“title”:”how to make millons “}},
        “must_not”:{“match”:{“tag”:”spam“}},
        “should”:[
        {“match”:{“tag”:”started“}},
        ],
        “filter”:{
            “range”:{
            “date”:{
                gte”:2024-01-01}
            }
    }
}

相关推荐

  1. Esbool 查询(must must_not should filter)

    2024-04-10 06:02:01       36 阅读
  2. ES: spring boot使用ElasticsearchClient

    2024-04-10 06:02:01       40 阅读
  3. ES6Promise

    2024-04-10 06:02:01       63 阅读
  4. ES6Set

    2024-04-10 06:02:01       55 阅读
  5. ES6Proxy

    2024-04-10 06:02:01       38 阅读
  6. ES6难点

    2024-04-10 06:02:01       30 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-10 06:02:01       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-10 06:02:01       106 阅读
  3. 在Django里面运行非项目文件

    2024-04-10 06:02:01       87 阅读
  4. Python语言-面向对象

    2024-04-10 06:02:01       96 阅读

热门阅读

  1. 在QT里使用TCP进行网络通信

    2024-04-10 06:02:01       29 阅读
  2. Android 14 vold 分析(1)启动

    2024-04-10 06:02:01       24 阅读
  3. Android 14 vold 分析(2)VolumeManager 和 NetlinkManger

    2024-04-10 06:02:01       27 阅读
  4. MyBatis事务管理

    2024-04-10 06:02:01       32 阅读
  5. 手写一个民用Tomcat (03)

    2024-04-10 06:02:01       31 阅读
  6. Android 14 vold 分析(3)vold和mount service通信

    2024-04-10 06:02:01       29 阅读
  7. 小程序中展示富文本 图片不适配?视频不显示?

    2024-04-10 06:02:01       44 阅读
  8. CentOS 7关机与重启命令详解

    2024-04-10 06:02:01       46 阅读