Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_int-search-engine

Search Engine (Elasticsearch / Lucene) Internals (Inverted Index & Segments)

8 COMPONENTS · 7 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[![Search Engine (Elasticsearch / Lucene) Internals (Inverted Index & Segments) — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_int-search-engine/opengraph-image)](https://archos.sageideas.dev/d/dgm_int-search-engine)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_int-search-engine)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_int-search-engine" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Search Engine (Elasticsearch / Lucene) Internals (Inverted Index & Segments) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  client_0["Search / Index API"]
  coord_1["Coordinating Node"]
  anl_2["Analyzer & Buffer"]
  tlog_3[("Translog")]
  seg_4[("Lucene Segments")]
  bm25_5["BM25 + DocValues"]
  merge_6["Segment Merger"]
  downstream_7["Downstream & OTel"]
  client_0 -->|"1. Index / · HTTPS"| coord_1
  coord_1 -->|"2a. Analyze · HTTP"| anl_2
  coord_1 -->|"2b. Append · fsync"| tlog_3
  anl_2 -.->|"3. 1s refresh · Lucene"| seg_4
  bm25_5 -->|"Intersect · BM25"| seg_4
  merge_6 -->|"Merge & · Merge"| seg_4
  seg_4 -.->|"4. Emit / · OTLP/API"| downstream_7

COMPONENT STACK (8)

  • Search / Index APISTATELESS
    JSON Docs & Queries
  • Coordinating NodeSTATELESS
    Scatter-gather across shards
  • Analyzer & BufferSTATELESS
    Tokenize, stem & in-RAM buffer
  • TranslogSTATEFUL
    fsync durability before 1s refresh
  • Lucene SegmentsSTATEFUL
    FST term dict + posting lists
  • BM25 + DocValuesSTATELESS
    Relevance score + aggregations
  • Segment MergerSTATELESS
    Compacts segments & expunges del
  • Downstream & OTelSTATELESS
    Consumers, metrics & SLOs

REQUEST & DATA FLOW (7)

  1. Search / Index API → Coordinating Node (Index /)[HTTPS]
  2. Coordinating Node → Analyzer & Buffer (Analyze)[HTTP]
  3. Coordinating Node → Translog (Append)[fsync]
  4. Analyzer & Buffer → Lucene Segments (1s refresh)[Lucene]
  5. BM25 + DocValues → Lucene Segments (Intersect)[BM25]
  6. Segment Merger → Lucene Segments (Merge &)[Merge]
  7. Lucene Segments → Downstream & OTel (Emit /)[OTLP/API]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →