- Elasticsearch 教程
- Elasticsearch - 首頁
- Elasticsearch - 基本概念
- Elasticsearch - 安裝
- Elasticsearch - 資料填充
- 版本之間遷移
- Elasticsearch - API 約定
- Elasticsearch - 文件 API
- Elasticsearch - 搜尋 API
- Elasticsearch - 聚合
- Elasticsearch - 索引 API
- Elasticsearch - CAT API
- Elasticsearch - 叢集 API
- Elasticsearch - 查詢 DSL
- Elasticsearch - 對映
- Elasticsearch - 分析
- Elasticsearch - 模組
- Elasticsearch - 索引模組
- Elasticsearch - Ingest 節點
- Elasticsearch - 管理索引生命週期
- Elasticsearch - SQL 訪問
- Elasticsearch - 監控
- Elasticsearch - 資料彙總
- Elasticsearch - 凍結索引
- Elasticsearch - 測試
- Elasticsearch - Kibana 儀表盤
- Elasticsearch - 按欄位過濾
- Elasticsearch - 資料表格
- Elasticsearch - 區域地圖
- Elasticsearch - 餅圖
- Elasticsearch - 面積圖和條形圖
- Elasticsearch - 時間序列
- Elasticsearch - 標籤雲
- Elasticsearch - 熱力圖
- Elasticsearch - Canvas
- Elasticsearch - 日誌 UI
- Elasticsearch 有用資源
- Elasticsearch - 快速指南
- Elasticsearch - 有用資源
- Elasticsearch - 討論
Elasticsearch - 凍結索引
經常搜尋的索引會儲存在記憶體中,因為重建它們需要時間,並且有助於進行高效搜尋。另一方面,可能有一些我們很少訪問的索引。這些索引不需要佔用記憶體,並且可以在需要時重建。此類索引稱為凍結索引。
Elasticsearch 在每次搜尋凍結索引的每個分片的瞬態資料結構時構建這些資料結構,並在搜尋完成後丟棄這些資料結構。因為 Elasticsearch 不會在記憶體中維護這些瞬態資料結構,所以凍結索引比普通索引消耗的堆記憶體少得多。這允許比否則可能實現的更高的磁碟與堆比率。
凍結和解凍示例
以下示例凍結和解凍了一個索引:
POST /index_name/_freeze POST /index_name/_unfreeze
對凍結索引的搜尋預計執行速度會很慢。凍結索引不適用於高搜尋負載。即使在索引未凍結時相同的搜尋在幾毫秒內完成,對凍結索引的搜尋也可能需要幾秒鐘或幾分鐘才能完成。
搜尋凍結索引
每個節點上併發載入的凍結索引的數量受 search_throttled 執行緒池中執行緒數的限制,預設情況下為 1。要包含凍結索引,必須使用查詢引數執行搜尋請求:ignore_throttled=false。
GET /index_name/_search?q=user:tpoint&ignore_throttled=false
監控凍結索引
凍結索引是使用搜索節流和記憶體高效分片實現的普通索引。
GET /_cat/indices/index_name?v&h=i,sth
廣告