ARCHOS 525 BLUEPRINT · /d/dgm_code-trie-and-autocomplete-structures
Trie & Top-K Autocomplete Data Structures
6 COMPONENTS · 6 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[](https://archos.sageideas.dev/d/dgm_code-trie-and-autocomplete-structures) *Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_code-trie-and-autocomplete-structures)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_code-trie-and-autocomplete-structures" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Trie & Top-K Autocomplete Data Structures — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
client_0["Keystroke Query"]
n1_1["Prefix Normalizer"]
n2a_2[("Prefix Trie / FST")]
n2b_3[("Precomputed Top-K")]
n3_4["Filtered Suggestions"]
downstream_5["Downstream & OTel"]
client_0 -->|"1. Normalize · UTF-8"| n1_1
n1_1 -->|"2a. Walk O · Trie"| n2a_2
n1_1 -->|"2b. Read · Array"| n2b_3
n2a_2 -->|"3a. Filter/Emi · JSON"| n3_4
n2b_3 -->|"3b. Merge · RAM"| n3_4
n3_4 -.->|"4. Emit / · OTLP/API"| downstream_5COMPONENT STACK (6)
- Keystroke QuerySTATELESSPrefix string
- Prefix NormalizerSTATELESSLowercase, trim & Unicode NFKC
- Prefix Trie / FSTSTATEFULWalks O prefix edges
- Precomputed Top-KSTATEFULStores top-10 ranked terms/node
- Filtered SuggestionsSTATELESSSafety blocklist + dedup output
- Downstream & OTelSTATELESSConsumers, metrics & SLOs
REQUEST & DATA FLOW (6)
- Keystroke Query → Prefix Normalizer (Normalize)[UTF-8]
- Prefix Normalizer → Prefix Trie / FST (Walk O)[Trie]
- Prefix Normalizer → Precomputed Top-K (Read)[Array]
- Prefix Trie / FST → Filtered Suggestions (Filter/Emi)[JSON]
- Precomputed Top-K → Filtered Suggestions (Merge)[RAM]
- Filtered Suggestions → Downstream & OTel (Emit /)[OTLP/API]