Engine: live
Elasticsearch, inside
How a search engine keeps its documents: in immutable Lucene segments, each with an inverted index, a column store and a tree of numbers, and a translog of what came since. Drop a shard's files and see them, down to the bytes and back up to the JSON.
Shard viewerDrop a shard's files: segments, every term and posting, doc values, points, the translog, and the documents rebuilt from them. Nothing is uploaded.How it is storedShards and segments, the commit point, stored fields and _source, the inverted index, doc values, points, soft deletes and the translog.
Start here
- Open the sample shards: two indexes of a music catalogue, albums and tracks.
- Click documents: the JSON rebuilt from the files, with the writes still only in the translog marked.
- Open a segment and the field
name(in tracks): every term, how many documents have it, and, on a click, its postings with positions. - Open translog: the operations written after the last commit.
Lucene's segments are immutable and merged in the background, a cousin of the log-structured merge trees in the LevelDB and RocksDB section.