stack-es-标准篇-ElasticsearchClient-filter

三次方

关注

阅读 42

2022-05-06

文章目录

功能

  • 对返回结果进行过滤
  • filter 对搜索和聚合有效
  • post_filter 只对搜索有效

关键字

  • bool
    • filter
  • post_filter

原语句

PUT index_filter
{
  "mappings": {
    "properties": {
      "brand": {"type": "keyword"},
      "color": {"type": "keyword"},
      "model": {"type": "keyword"}
    }
  }
}



GET index_filter/_mapping



POST index_filter/_bulk
{"create": {}}
{"brand": "gucci", "color": "red"

精彩评论(0)

0 0 举报