接下來我們要來探討ES操作背後涉及到的原理
幫助我們整合以前學過的一些觀念
在ES中的基本資料操作主要分成以下四種:
而其中index, delete與update可以被分類成寫操作,search則為讀操作
這兩天會針對寫跟讀操作來分別進行探討
這邊我們用indexing來進行講解
coordinator node負責接收請求
ingest pipeline
routing,如果沒有就預設_id
primary shard
analyzer處理replica shard
wait_for_active_shards參數,決定要等多少shard回覆後再回傳給coordinator
我們在第7步的indexing這邊再進行講解
memory buffer中,此時文檔還不能被搜尋
transaction log
index.refresh_interval來決定refresh的時間間隔refresh時:
flush,也就是將記憶體中的資料存入磁碟中

接著我們總結一下這樣寫操作中分別具備哪些性質:
參考資料
流程圖參考:
https://www.elastic.co/pdf/elasticsearch-sizing-and-capacity-planning.pdf
https://pdai.tech/md/db/nosql-es/elasticsearch-y-th-3.html
寫原理:
https://pdai.tech/md/db/nosql-es/elasticsearch-y-th-3.html