Skip to content

Use Lucene search engine for new RavenDB databases and flag indexes still on Corax - #5833

Draft
ramonsmits wants to merge 4 commits into
masterfrom
ramon/lucene-for-new-databases
Draft

Use Lucene search engine for new RavenDB databases and flag indexes still on Corax#5833
ramonsmits wants to merge 4 commits into
masterfrom
ramon/lucene-for-new-databases

Conversation

@ramonsmits

@ramonsmits ramonsmits commented Aug 28, 2026

Copy link
Copy Markdown
Member

Summary

Load testing showed that Lucene indexes are smaller, use less RAM and are faster than Corax for the index definitions ServiceControl uses. This PR moves new databases to Lucene while leaving existing databases untouched, and makes it visible to operators when their indexes are still on Corax.

Switching an existing database is deliberately not done automatically: changing the search engine triggers a full rebuild of all indexes, which on very large databases can take days depending on available compute and degrades ingestion/indexing rates while it runs. Migration remains an operator decision (docs guidance to follow).

Changes

  • New databases are created with Indexing.Static/Auto.SearchEngineType=Lucene (Primary main + throughput databases, Audit). UpdateDatabaseSettings is unchanged, so existing databases keep whatever engine they currently have configured.
  • Startup WARN listing any index still using Corax (StartupChecks.WarnIfIndexesUseCorax, shared by both persisters).
  • Custom check Error Database Search Engine / Audit Database Search Engine surfacing the same information in ServicePulse (hourly).
  • Tests: default engine for a fresh database is Lucene; per-index override is still reset on setup; Corax detection is covered; custom check approval files updated.

New databases are created with Indexing.Static/Auto.SearchEngineType=Lucene:
Lucene indexes are smaller, use less memory and are faster for the index
definitions ServiceControl uses. Existing databases keep the engine they
currently have configured, so no full index rebuild is triggered on upgrade.
New databases use Lucene, existing databases keep their configured search
engine. Operators of existing databases now get a WARN at startup listing the
indexes still on Corax so they can plan the transition to Lucene.
Surfaces the same information as the startup warning in ServicePulse via a
custom check on both the Primary (main + throughput database) and Audit
instances, so operators see it without inspecting logs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants