How nordmanndev/lui works
LUI is a .NET library for typo-tolerant autocomplete over SQLite/FTS5, with embedded indexes or indexes linked to application-owned tables. The main workflow opens an index, configures a query, executes search, and returns ranked hits. Separate capabilities include bulk synchronization, typo-dictionary warmup, and ASP.NET Core/worker hosting. Relationships below are limited to those shown in the excerpts, SOURCE INDEX references, or README; unsampled implementation details are represented only where the tree supports the subsystem.
Main entry points: QueryRunner.cs Query execution · LuiCatalog.cs Catalog API · EmbeddedIndex.cs Embedded index · LinkedIndex.cs Linked index
Components 19
Catalog and indexes
- Catalog API
src/Nordmann.LUI/LuiCatalog.cs - Embedded index
src/Nordmann.LUI/Indexes/EmbeddedIndex.cs - Linked index
src/Nordmann.LUI/Indexes/LinkedIndex.cs - Index synchronization
src/Nordmann.LUI/Indexes/EmbeddedSync.cs
Query and ranking
- Query builder
src/Nordmann.LUI/LuiQuery.cs - Query execution
src/Nordmann.LUI/Querying/QueryRunner.cs - Candidate reading
src/Nordmann.LUI/Querying/CandidateReader.cs - Typo correction
src/Nordmann.LUI/Querying/TypoCorrection.cs - Ranking and hits
src/Nordmann.LUI/Querying/Ranker.cs - Search results
src/Nordmann.LUI/LuiResult.cs
SQLite and schema
- SQLite access
src/Nordmann.LUI/Storage/Database.cs - Embedded schema
src/Nordmann.LUI/Schema/EmbeddedSource.cs - Linked schema
src/Nordmann.LUI/Schema/LinkedSource.cs - Index definitions
src/Nordmann.LUI/Schema/IndexDefinition.cs
Normalization and hosting
- Text normalization
src/Nordmann.LUI/Normalization/Normalizer.cs - Typo dictionary
src/Nordmann.LUI/Typos/TypoDictionary.cs - Hosting integration
src/Nordmann.LUI.Hosting/LuiServiceCollectionExtensions.cs - Hosted warmup
src/Nordmann.LUI.Hosting/Hosting/LuiWarmupService.cs
Other components
- Application
Connections 25
- Application → Catalog API: opens catalog
- Catalog API → Embedded index: opens index
src/Nordmann.LUI/LuiCatalog.cs - Catalog API → Linked index: opens linked
src/Nordmann.LUI/LuiCatalog.cs - Application → Query builder: configures search
- Query builder → Embedded index: executes on
src/Nordmann.LUI/LuiQuery.cs - Query builder → Linked index: executes on
src/Nordmann.LUI/LuiQuery.cs - Embedded index → Query execution: uses runner
src/Nordmann.LUI/Indexes/EmbeddedIndex.cs - Linked index → Query execution: uses runner
src/Nordmann.LUI/Indexes/LinkedIndex.cs - Query execution → SQLite access: reads SQLite
src/Nordmann.LUI/Querying/QueryRunner.cs - Query execution → Candidate reading: reads candidates
src/Nordmann.LUI/Querying/QueryRunner.cs - Query execution → Typo correction: requests correction
src/Nordmann.LUI/Querying/QueryRunner.cs - Query execution → Ranking and hits: ranks candidates
src/Nordmann.LUI/Querying/QueryRunner.cs - Query execution → Typo dictionary: uses dictionary
src/Nordmann.LUI/Querying/QueryRunner.cs - Query execution → Search results: returns hits
src/Nordmann.LUI/Querying/QueryRunner.cs - Embedded index → Embedded schema: indexes content
src/Nordmann.LUI/Indexes/EmbeddedIndex.cs - Linked index → Linked schema: reads linked table
src/Nordmann.LUI/Indexes/LinkedIndex.cs - Catalog API → SQLite access: initializes store
src/Nordmann.LUI/LuiCatalog.cs - Embedded schema → Index definitions: uses definition
src/Nordmann.LUI/Schema/EmbeddedSource.cs - Linked schema → Index definitions: uses definition
src/Nordmann.LUI/Schema/LinkedSource.cs - Embedded index → Index synchronization: syncs entries
src/Nordmann.LUI/Indexes/EmbeddedIndex.cs - Query execution → Text normalization: normalizes query
src/Nordmann.LUI/Querying/QueryRunner.cs - Typo dictionary → Text normalization: normalizes words
src/Nordmann.LUI/Typos/TypoDictionary.cs - Application → Hosting integration: registers services
src/Nordmann.LUI.Hosting/LuiServiceCollectionExtensions.cs - Hosting integration → Hosted warmup: registers warmup
src/Nordmann.LUI.Hosting/LuiServiceCollectionExtensions.cs - Hosted warmup → Catalog API: warms catalog
src/Nordmann.LUI.Hosting/Hosting/LuiWarmupService.cs