From 380df1a21fb7ae0ac06e50bb039f76548768e2ed Mon Sep 17 00:00:00 2001 From: HappyJoeJoe <1553275381@qq.com> Date: Wed, 27 Nov 2019 16:02:29 +0800 Subject: [PATCH] Update 35_Search_as_you_type.asciidoc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 按照上下文理解, keyword分词器是把查询词当做`not_analyzed`字段处理的, 那postcode为了像keyword一样, 也应该是把字段当做`not_analyzed`处理而不是`analyzed`, 文章是不是写反了? --- 130_Partial_Matching/35_Search_as_you_type.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/130_Partial_Matching/35_Search_as_you_type.asciidoc b/130_Partial_Matching/35_Search_as_you_type.asciidoc index 0cbba7619..18c61c799 100644 --- a/130_Partial_Matching/35_Search_as_you_type.asciidoc +++ b/130_Partial_Matching/35_Search_as_you_type.asciidoc @@ -261,7 +261,7 @@ Elasticsearch ((("completion suggester")))里的 {ref}/search-suggesters-complet ==== 边界 n-grams 与邮编 -边界 n-gram 的方式可以用来查询结构化的数据,((("postcodes (UK), partial matching with", "using edge n-grams")))((("edge n-grams", "and postcodes")))比如 <> 中的邮编(postcode)。当然 `postcode` 字段需要 `analyzed` 而不是 `not_analyzed` ,不过可以用 `keyword` 分词器来处理它,就好像他们是 `not_analyzed` 的一样。((("keyword tokenizer", "using for values treated as not_analyzed")))((("not_analyzed fields", "using keyword tokenizer with"))) +边界 n-gram 的方式可以用来查询结构化的数据,((("postcodes (UK), partial matching with", "using edge n-grams")))((("edge n-grams", "and postcodes")))比如 <> 中的邮编(postcode)。当然 `postcode` 字段需要 `not_analyzed` 而不是 `analyzed` ,不过可以用 `keyword` 分词器来处理它,就好像他们是 `not_analyzed` 的一样。((("keyword tokenizer", "using for values treated as not_analyzed")))((("not_analyzed fields", "using keyword tokenizer with"))) [TIP] ==================================================