<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、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # 磁盤使用調優 原文鏈接 : [https://www.elastic.co/guide/en/elasticsearch/reference/5.3/tune-for-disk-usage.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/tune-for-disk-usage.html) 譯文鏈接 : [磁盤使用調優](/pages/viewpage.action?pageId=9405601) 貢獻者 : @李堅,[ApacheCN](/display/~apachecn),[Apache中文網](/display/~apachechina) ## 禁用不需要的功能 默認情況下,_elasticsearch _索引并且新增數據到大多數的字段中,以便于它們能夠被索引和聚合。比如,你有一個叫 _foo_ 的數字 _field(字段)_,你想要一個 _histograms__(直方圖)_ 但是不需要過濾,那么就可以在 _mappings(映射)_ 中禁用這用這個 _field(字段)_的索引。 ``` PUT index { "mappings": { "type": { "properties": { "foo": { "type": "integer", "index": false } } } } } ``` _text field(文本字段)_在索引中規范化的存儲是為了對 _documents_ 進行評分。如果你只想要 text field(文本字段)的匹配功能,不關心生成的分數,可以在 elasticsearch中配置中成不向索引編寫規范: ``` PUT index { "mappings": { "type": { "properties": { "foo": { "type": "text", "norms": false } } } } } ``` _text field(文本字段)_ 默認情況下還存儲了在索引的頻率和位置,頻率用于計算得分,而位置用于短語查詢;如果不需要進行短語查詢,你可以告訴 _elasticsearch _不索引位置: ``` PUT index { "mappings": { "type": { "properties": { "foo": { "type": "text", "index_options": "freqs" } } } } } ``` 此外,如果你不關心得分,可以配置 _elasticsearch _?只索引匹配到的 _documents_? (文檔)。這個字段仍然可以被搜索,但是短語查詢的時候會報錯并且得分將假設每個 _documents_? (文檔)中只出現一次。 ``` PUT index { "mappings": { "type": { "properties": { "foo": { "type": "text", "norms": false, "index_options": "freqs" } } } } } ``` ## 不要使用默認的動態字符串映射 默認的 _dynamic string mappings (動態字符串映射)_將以 _text(文本)_和 _keywords(關鍵字)_的形式對字符串字段進行索引。如果你只需要使用它們中的一種,這么做是浪費的。通常 _id field(id 字段)_只需要被當成 _keywords(關鍵字)_來索引,而 _body field(字段)_只需要被當成 _text(文本) field(字段)_來索引。 禁用 _dynamic string mappings (動態字符串映射)_方法有:明確 _string fields(字符串字段)_的 _mapping(映射)_或者為 _text(文本)_和 _keywords(關鍵字)_映射的字符串字段設置動態 _templates(模版) 。_ 例如,這是一個將字符串字段映射為 _keywords(關鍵字)_ 的模版: ``` PUT index { "mappings": { "type": { "dynamic_templates": [ { "strings": { "match_mapping_type": "string", "mapping": { "type": "keyword" } } } ] } } } ``` ## 禁用 __all_ __all field(字段)_ 將會索引所有字段中的所有值,這將會很大的空間。如果你不需要同時搜索所有字段,可以禁用 __all field(字段)_。 ## 使用 _best_compression_ _source 和 存儲的字段將會占用很大的存儲空間。可以使用 _best_compression? codec(編解碼器)_ 進行有效的壓縮。 ## 使用最合適的最小數字類型 您為數字數據選擇的類型可能會對磁盤使用量產生重大影響。特別地,整數應該使用整數類型(_byte, short, integer or long_)(字節,短整數或長整數)存儲,并且浮點應該被存儲在 _scaling_float_ 中,如果合適的話也可以存儲在符合用例的最小類型中:使用 _float over double_ 或 浮點數的 _half_float_ 將有助于節省存儲空間。
                  <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>

                              哎呀哎呀视频在线观看