ES bool查询
2024-10-21 14:38:21
一、bool查询包含四种操作
1.must
2.must not
3.filter
4.should
二、功能
1.must 对应mysql的 and a=
2.must not 对应mysql的 and a!=
3.filter 对应mysql的 and a=
4.should 对应mysql的 or a=
三、must和filter比较
1.must算分,filter不算分
2.filter效率比must高
四、filter效率高的原理
1.query context:文档更加匹配查询条件,分数越高越匹配
2.filter context:文档是否匹配查询条件,并且ES会缓存查询结果
参考:
https://blog.csdn.net/pony_maggie/article/details/106062284
最新文章
- c#上iOS apns p12文件制作记录 iOS推送证书制件
- Loadrunner中web_custom_request使用场景
- 【Android 界面效果20】Android GradientDrawable类的详解,设置activity的背景颜色渐变效果
- Demo学习: Basic jQuery
- UVA 10627 - Infinite Race(数论)
- hdu4010-Query on The Trees(lct分裂合并加值查询最大值)
- struts2.3.15.3中动态方法调用默认是关闭的
- Linux学习之域名解析命令
- Linux环境下编译并执行ava helloworld程序
- 跟Bob大叔观OO原则
- 配置apache
- CSS中设置height:100%无效的解决方案
- java-枚举一些字典信息的例子
- 阅读MDN文档之CSS选择器介绍(一)
- iOS钉钉远程打卡助手(支持越狱和非越狱)
- CentOS6 网络设置
- web服务器上某一中文名文件无法访问
- 最小生成树模板【kruskal &; prim】
- html5-表单和input元素用法
- 使用eclipse构建Maven项目及发布一个Maven项目