{ "query": { "bool": { "should": [ { "match": { "name": { "analyzer": "ik_smart", "query": "haha" } } } ] } } } match或者match_phrase会对搜索词分词,此时默认使用的分词方法是对应字段的分词方法,可以通过以上方法为搜索词指定分词方法。 注: 要搜索词分词和字段分词的匹配,搜索词不分词和字段不分词的匹配 match或者match_phrase就是对搜索词分词,这个时候字段不用keyword, wildcard不对搜索词分词,所以字段要加.keyword