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

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # _default_ mapping(mapping中的_default_) 在一個將被用于映射任何類型的基本mapping中,在[創建索引](/pages/viewpage.action?pageId=4882789)時或者調用[PUT mapping](/pages/viewpage.action?pageId=4882803) API時,我們可以通過添加一個名為_default_的映射類型來定制一個索引。 ``` PUT my_index { "mappings": { "_default_": { #1 "_all": { "enabled": false } }, "user": {}, #2 "blogpost": { #3 "_all": { "enabled": true } } }} ``` | 1 | 在mapping的_default_中,將[_all](/display/Elasticsearch/_all+field)字段設置為禁用,該mapping中的所有類型的_all字段默認為禁用。 | | 2 | user類型從_default_中繼承相關設置。 | | 3 | blogpost類型覆蓋相關默認值,并且啟用[_all](/display/Elasticsearch/_all+field)字段。 | Tips 當使用[PUT mapping](/pages/viewpage.action?pageId=4882803) API更新mapping的_default_時,新的mapping不會與現有的mapping合并。相反,新的mapping的_defalut_會替換現有的。 雖然mapping的_default_可以在索引創建后更新,但是新的默認值只會影響之后創建的映射類型。 mapping中的_default_可以與索引模板一起使用,用來控制自動創建的索引中動態創建的類型。 ``` PUT _template/logging { "template": "logs-*", #1 "settings": { "number_of_shards": 1 }, #2 "mappings": { "_default_": { "_all": { #3 "enabled": false }, "dynamic_templates": [ { "strings": { #4 "match_mapping_type": "string", "mapping": { "type": "text", "fields": { "raw": { "type": "keyword", "ignore_above": 256 } } } } } ] } }} PUT logs-2015.10.01/event/1{ "message": "error:16" } ``` | 1 | logging模板將匹配以logs-開頭的任何索引。 | | 2 | 匹配的索引將會創建單個主分片。 | | 3 | 在新的映射類型中,_all字段將會被默認禁用。 | | 4 | 字符串字段將會被創建到名為text的主字段和一個 keyword.raw字段中。 | 原文鏈接 : [https://www.elastic.co/guide/en/elasticsearch/reference/5.3/default-mapping.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/default-mapping.html)(修改該鏈接為官網對應的鏈接) 譯文鏈接 : [http://www.apache.wiki/pages/viewpage.action?pageId=9405471](http://www.apache.wiki/pages/viewpage.action?pageId=9405471)(修改該鏈接為 **ApacheCN** 對應的譯文鏈接) 貢獻者 : [曾少峰](/display/~zengshaofeng),[ApacheCN](/display/~apachecn),[Apache中文網](/display/~apachechina)
                  <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>

                              哎呀哎呀视频在线观看