filter context介紹
在查詢過程中,只判斷該文檔是否滿足條件
只有Yes或No
使用PostMan進行filter context查詢
查詢字數1000的書籍(word_count爲1000),共有5條查詢結果
filter會對查詢結果進行緩存,效率比query快,filter要與bool一起結合使用
複合查詢
常用複合條件查詢
固定分數查詢
布爾查詢
使用PostMan進行復合查詢
先看看普通的查詢
查詢結果
{
"took": 18,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"skipped": 0,
"failed": 0
},
"hits": {
"total": 3,
"max_score": 0.7505476,
"h