查询时的Elasticsearch search_analyzer

时间:2018-11-15 10:33:39

标签: elasticsearch

我们可以在查询时提供类似于空白的search_analyzer吗? 像这样:

"multi_match": {
  "query": "423.0",
  "type": "phrase",
  "search_analyzer": "whitespace",
  "fields": []
}

1 个答案:

答案 0 :(得分:1)

是,字段名称为analyzer

示例:

GET /_search
{
  "query": {
    "multi_match" : {
      "query":      "quick brown f",
      "type":       "phrase_prefix",
      "analyzer":   "whitespace",
      "fields":     [ "subject", "message" ]
    }
  }
}

有关更多详细信息,请查看文档:{​​{3}}