使用 dmesg 来查看一些硬件或驱动程序的信息或问题。

multi_match 如何再加入对某字段的匹配限制?term?

Elasticsearch | 作者 devilhookey | 发布于2016年11月14日 | 阅读数:4926

{
  "query": {
    "multi_match": {
      "query": "描述文字",
      "fields": [
        "title^10",
        "name",
        "mode",
        "color",
        "username",
        "other"
      ],
      "minimum_should_match": "90%"
    },
    "term": {
      "color": "黑"
    }
  }
 }
​如上这样会报错?哪位知道应该怎么搞?
已邀请:

strglee

赞同来自: devilhookey

{
"query": {
"bool":{
"must":[
{
"multi_match": {
"query": "描述文字",
"fields": [
"title^10",
"name",
"mode",
"color",
"username",
"other"
],
"minimum_should_match": "90%"
}
},
{
"term": {
"color": "黑"
}
}
]
}
}
}

要回复问题请先登录注册