0
点赞
收藏
分享

微信扫一扫

stack-es-标准篇-ElasticsearchClient-filter

三次方 2022-05-06 阅读 42

文章目录

功能

  • 对返回结果进行过滤
  • 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 条评论