<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國際加速解決方案。 廣告
                # ignore_malformed(忽略格式不對的數據) 原文鏈接 : [https://www.elastic.co/guide/en/elasticsearch/reference/5.3/ignore-malformed.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/ignore-malformed.html) 譯文鏈接 : [http://www.apache.wiki/pages/createpage-entervariables.action?templateId=4816898&spaceKey=Elasticsearch&title=&newSpaceKey=Elasticsearch&fromPageId=9405287](http://www.apache.wiki/pages/createpage-entervariables.action?templateId=4816898&spaceKey=Elasticsearch&title=&newSpaceKey=Elasticsearch&fromPageId=9405287) 貢獻者 : [程威](/display/~chengwei),[ApacheCN](/display/~apachecn),[Apache中文網](/display/~apachechina) 有時候你對接受到的數據不會有太多的控制.一個用戶可能發送一個日期類型的登錄字段,另一個用戶發送一個郵箱地址的登錄字段. 嘗試將錯誤的數據類型索引到字段中,默認情況會拋出異常,并拒絕整個 **document**(文檔).**ignore_malformed**?參數(如果設置為true)允許忽略該異常。格式不正確的字段不會被索引,但文檔中的其他字段正常處理。 ``` curl -XPUT 'localhost:9200/my_index?pretty' -H 'Content-Type: application/json' -d' { "mappings": { "my_type": { "properties": { "number_one": { "type": "integer", "ignore_malformed": true }, "number_two": { "type": "integer" } } } } } ' curl -XPUT 'localhost:9200/my_index/my_type/1?pretty' -H 'Content-Type: application/json' -d' { "text": "Some text value", "number_one": "foo" } ' curl -XPUT 'localhost:9200/my_index/my_type/2?pretty' -H 'Content-Type: application/json' -d' { "text": "Some text value", "number_two": "foo" } ' ``` | 1 | 這個 **document**(文檔)會索引text 字段,但不是 **number_one** 字段。 | | 2 | 這個 **document**(文檔)會拒絕請求因為 **number_two** 不允許格式不正確的值. | ignore_malformed設置允許在相同索引中相同名稱的字段有不同的設置。可以使用 [PUT mapping API](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/indices-put-mapping.html "Put Mapping")?在現有字段上更新其值。 ## Index-level default 可以在索引級別上設置?**index.mapping.ignore_malformed?**的配置,以允許在所有映射類型中全局忽略格式錯誤的內容. ``` curl -XPUT 'localhost:9200/my_index?pretty' -H 'Content-Type: application/json' -d' { "settings": { "index.mapping.ignore_malformed": true # 1 }, "mappings": { "my_type": { "properties": { "number_one": { # 2 "type": "byte" }, "number_two": { "type": "integer", "ignore_malformed": false # 3 } } } } } ' ``` | 12 | ?**number_one** 字段 繼承 **index-level** 的配置. | | 3 | ?**number_two** 字段 覆蓋 **index-level** 配置來關閉 **ignore_malformed** 設置. | ## 目錄 3 -?標題 2 正文3 ## 目錄 N?-?標題 2 正文4
                  <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>

                              哎呀哎呀视频在线观看