Table of Contents

Class RunSearchIndexOptions

Namespace
FlowOrchestrator.Core.Configuration
Assembly
FlowOrchestrator.Core.dll

Options for the built-in run-search token index, enabled with UseRunSearchIndex(Action<RunSearchIndexOptions>?). Experimental in 2.0.

public sealed class RunSearchIndexOptions
Inheritance
RunSearchIndexOptions
Inherited Members

Remarks

The token index answers deep search ("find the run whose step output contains INV-001353358") with an index seek instead of a LIKE scan over step payloads: measured on SQL Server at 200k runs / 2M steps, 8 ms against 1.2 s (7-day window) and 84 ms against 98 s (no window).

Costs, measured there: about 72 token rows per run (1.3 GB per 200k runs, ~12% of the step table), an 8-minute newest-first background back-fill per 200k existing runs, and one extra commit per step completion and per run start (+5.4 ms p50 on a commit-bound disk, roughly doubling RecordStepCompleteAsync); see docs/benchmarks/run-search-2026-11-23.md.

Semantics differ from the default deep search: payload and error text match by token prefix, not substring (see RunSearchTokenizer). The run's own columns still match as substrings.

Supported by the SQL Server provider (database compatibility level 130 or later). Other providers ignore it.

Properties

Backfill

Whether existing runs are back-filled into the index in the background. Default true.

public bool Backfill { get; set; }

Property Value

bool

Remarks

While the back-fill is incomplete, deep search still finds the not-yet-indexed (older) runs with the default LIKE scan over that part of the window, so results stay complete — only slower.

BackfillBatchDelay

Pause between back-fill batches, to leave the database headroom. Default 100 ms.

public TimeSpan BackfillBatchDelay { get; set; }

Property Value

TimeSpan

BackfillBatchSize

Runs per back-fill batch (one transaction each). Default 200.

public int BackfillBatchSize { get; set; }

Property Value

int

Enabled

Whether the token index is maintained and used. Set by UseRunSearchIndex(Action<RunSearchIndexOptions>?).

public bool Enabled { get; set; }

Property Value

bool

MaxTokensPerDocument

Cap on distinct tokens taken from one run start or step completion. Default DefaultMaxTokensPerDocument.

public int MaxTokensPerDocument { get; set; }

Property Value

int

OrphanSweepInterval

How often tokens of runs deleted by retention are swept. Default 24 hours. The sweep walks the whole token table once (keyset over its clustered key); orphaned tokens are never returned by a search, they only take space until then.

public TimeSpan OrphanSweepInterval { get; set; }

Property Value

TimeSpan