Routing and Doc Versioning
2955 ワード
1. Routing
how does Elasticsearch know where to store docs?
how are documents found once indexed?
=> through routing
Routing : process of resolving a shard for a doc
elasticsearch uses hashing to select shard
shard_num = hash(_routing) % num_primary_shards
2. How Elasticsearch Reads Data
3. How Elasticsearch Writes Data
when replication fails, elasticsearch goes through recovery process
Primary terms : way to distinguish between old and new primary shards
Sequence number : way to track operation
for large indexes, Elasticsearch uses checkpoints
4. Document Versioning
only stores recent document
store version number of document
internal vs external versioning
above versioning is replaced by a better way
4-1. Optimistic Concurrency Control
prevent old doc overwriting new doc
POST /{index name}/_update/{doc name}?if_primary_term={X}&if_seq_no={Y}
Reference
この問題について(Routing and Doc Versioning), 我々は、より多くの情報をここで見つけました https://velog.io/@sangmin7648/Routing-and-Doc-Versioningテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol