<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # normalizer(歸一化) 原文鏈接 : [https://www.elastic.co/guide/en/elasticsearch/reference/current/normalizer.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/normalizer.html) 譯文鏈接 : [normalizer(歸一化)](/pages/viewpage.action?pageId=9406034) 貢獻者 : [程威](/display/~chengwei),[ApacheCN](/display/~apachecn),[Apache中文網](/display/~apachechina) **[`keyword`](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/keyword.html "Keyword datatype")****?fields**(關鍵字字段)?的?**`normalizer`**`(`歸一化)屬性與?[`analyzer`](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/analyzer.html "analyzer")`(`分析器)類似,只不過它保證?**analysis chain**(分析鏈)生成單一的?**`token` **`(詞元`). **`normalizer`**`(`歸一化)應用于索引?**keyword**(關鍵字)之前,以及諸如在?**`[match](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-query.html)?query?`**(匹配查詢),查詢解析器搜索?**keyword****?fields**(關鍵字字段)的時候. ``` curl -XPUT 'localhost:9200/index?pretty' -H 'Content-Type: application/json' -d' { "settings": { "analysis": { "normalizer": { "my_normalizer": { "type": "custom", "char_filter": [], "filter": ["lowercase", "asciifolding"] } } } }, "mappings": { "type": { "properties": { "foo": { "type": "keyword", "normalizer": "my_normalizer" } } } } } ' curl -XPUT 'localhost:9200/index/type/1?pretty' -H 'Content-Type: application/json' -d' { "foo": "BàR" } ' curl -XPUT 'localhost:9200/index/type/2?pretty' -H 'Content-Type: application/json' -d' { "foo": "bar" } ' curl -XPUT 'localhost:9200/index/type/3?pretty' -H 'Content-Type: application/json' -d' { "foo": "baz" } ' curl -XPOST 'localhost:9200/index/_refresh?pretty' curl -XGET 'localhost:9200/index/_search?pretty' -H 'Content-Type: application/json' -d' { "query": { "match": { "foo": "BAR" } } } ' ``` 上述查詢與?**documents(文檔)?1** 和 **2** 相匹配,這是因為在索引和查詢的時候都將?**`BAR?`**轉換為了?**`bar`**. ``` { "took": $body.took, "timed_out": false, "_shards": { "total": 5, "successful": 5, "failed": 0 }, "hits": { "total": 2, "max_score": 0.2876821, "hits": [ { "_index": "index", "_type": "type", "_id": "2", "_score": 0.2876821, "_source": { "foo": "bar" } }, { "_index": "index", "_type": "type", "_id": "1", "_score": 0.2876821, "_source": { "foo": "BàR" } } ] } } ``` 此外,**keywords?**在索引之前轉換意味著聚合返回?**normalised?values**(歸一化的值): ``` curl -XGET 'localhost:9200/index/_search?pretty' -H 'Content-Type: application/json' -d' { "size": 0, "aggs": { "foo_terms": { "terms": { "field": "foo" } } } } ' ``` 返回 ``` { "took": 43, "timed_out": false, "_shards": { "total": 5, "successful": 5, "failed": 0 }, "hits": { "total": 3, "max_score": 0.0, "hits": [] }, "aggregations": { "foo_terms": { "doc_count_error_upper_bound": 0, "sum_other_doc_count": 0, "buckets": [ { "key": "bar", "doc_count": 2 }, { "key": "baz", "doc_count": 1 } ] } } } ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看