<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>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # Token數 原文鏈接 : [https://www.elastic.co/guide/en/elasticsearch/reference/current/token-count.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/token-count.html) 譯文鏈接 :[http://www.apache.wiki/pages/viewpage.action?pageId=10030674](http://www.apache.wiki/pages/viewpage.action?pageId=10030674) 貢獻者 : [李亞運](/display/~liyayun),[ApacheCN](/display/~apachecn),[Apache中文網](/display/~apachechina) ## 簡述 類型為`token_count`的字段是一個接受字符串值的[`integer`](https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html)字段,對它們進行分析,然后對字符串中的token數進行索引。 ## 示例 例如: ``` PUT my_index { "mappings": { "my_type": { "properties": { "name": { "type": "text", "fields": { "length": { "type": "token_count", "analyzer": "standard" } } } } } } } PUT my_index/my_type/1 { "name": "John Smith" } PUT my_index/my_type/2 { "name": "Rachel Alice Williams" } GET my_index/_search { "query": { "term": { "name.length": 3 } } } ``` | [![](https://img.kancloud.cn/89/2e/892e2d6105d4361c3e81583c8e019d23_14x15.jpg)](https://translate.googleusercontent.com/translate_c?depth=1&hl=zh-CN&rurl=translate.google.com&sl=en&sp=nmt4&tl=zh-CN&u=https://www.elastic.co/guide/en/elasticsearch/reference/current/token-count.html&usg=ALkJrhj-xw1n9gZS9tQ_tK5CUYOeTr55wA#CO186-1) | `name`字段是使用默認`standard`分析器的分析字符串字段。 | | [![](https://img.kancloud.cn/50/46/50466ab92768bfee2306a5da100c7496_14x15.jpg)](https://translate.googleusercontent.com/translate_c?depth=1&hl=zh-CN&rurl=translate.google.com&sl=en&sp=nmt4&tl=zh-CN&u=https://www.elastic.co/guide/en/elasticsearch/reference/current/token-count.html&usg=ALkJrhj-xw1n9gZS9tQ_tK5CUYOeTr55wA#CO186-2) | `name.length`字段是一個`token_count`?[多字段](https://www.elastic.co/guide/en/elasticsearch/reference/current/multi-fields.html)?,它將在`name`字段中索引token的數量。 | | [![](https://img.kancloud.cn/59/09/59090687855ebb833c063fe09e622609_14x15.jpg)](https://translate.googleusercontent.com/translate_c?depth=1&hl=zh-CN&rurl=translate.google.com&sl=en&sp=nmt4&tl=zh-CN&u=https://www.elastic.co/guide/en/elasticsearch/reference/current/token-count.html&usg=ALkJrhj-xw1n9gZS9tQ_tK5CUYOeTr55wA#CO186-3) | 此查詢僅匹配包含`Rachel Alice Williams`的文檔,因為它包含三個token。 | ![注意](https://img.kancloud.cn/50/1f/501f430e0c03baa87f0bbf9c0e08af0d_66x58.jpg) 在技術上,?`token_count`類型對位置增量進行求和,而不是對token計數。?這意味著即使分析儀濾除停止詞,它們也包括在計數中。 ## 參數 `token_count`字段接受以下參數: | [`analyzer`](https://www.elastic.co/guide/en/elasticsearch/reference/current/analyzer.html) | 應該用于分析字符串值的[分析器](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis.html)?。必須值。?為獲得最佳性能,請使用不帶token過濾器的分析器。 | | [`boost`](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-boost.html) | 映射字段級查詢時間提升。?接受一個浮點數,默認為`1.0`?。 | | [`doc_values`](https://www.elastic.co/guide/en/elasticsearch/reference/current/doc-values.html) | 該字段是否應該以多列的方式存儲在磁盤上,以便以后可以將其用于排序,聚合或腳本化?接受`true`?(默認)或`false`?。 | | [`index`](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-index.html) | 應該可以搜索該字段嗎??接受`not_analyzed`?(默認)和`no`?。 | | [`include_in_all`](https://www.elastic.co/guide/en/elasticsearch/reference/current/include-in-all.html) | 字段值是否應包含在[`_all`](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-all-field.html)字段中??接受`true`或`false`?默認為`false`?。?注意:如果為`true`?,則將字符串值添加到_all,而不是計算的token數量。 | | [`null_value`](https://www.elastic.co/guide/en/elasticsearch/reference/current/null-value.html) | 接受與替換任何顯式`null`值的字段相同`type`的數值。?默認為`null`?,這意味著該字段被視為丟失。 | | [`store`](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-store.html) | 字段值是否應與[`_source`](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-source-field.html)字段分開存儲和檢索。?接受`true`或`false`?(默認)。 |
                  <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>

                              哎呀哎呀视频在线观看