Table of Contents

Interface ISchemaEvolutionHandler

Namespace
Excalibur.Data.ElasticSearch.Projections
Assembly
Excalibur.Data.ElasticSearch.dll

Manages schema evolution and migrations for ElasticSearch projections.

public interface ISchemaEvolutionHandler

Methods

CompareSchemaAsync(string, string, CancellationToken)

Analyzes schema differences between source and target indices.

Task<SchemaComparisonResult> CompareSchemaAsync(string sourceIndex, string targetIndex, CancellationToken cancellationToken)

Parameters

sourceIndex string

The source index name.

targetIndex string

The target index name or mapping.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<SchemaComparisonResult>

A schema comparison result detailing the differences.

DryRunMigrationAsync(SchemaMigrationPlan, int, CancellationToken)

Performs a dry run of a schema migration without applying changes.

Task<SchemaMigrationDryRunResult> DryRunMigrationAsync(SchemaMigrationPlan plan, int sampleSize, CancellationToken cancellationToken)

Parameters

plan SchemaMigrationPlan

The migration plan to test.

sampleSize int

The number of documents to test with.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<SchemaMigrationDryRunResult>

The dry run results.

ExecuteMigrationAsync(SchemaMigrationPlan, CancellationToken)

Executes a schema migration plan.

Task<SchemaMigrationResult> ExecuteMigrationAsync(SchemaMigrationPlan plan, CancellationToken cancellationToken)

Parameters

plan SchemaMigrationPlan

The migration plan to execute.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<SchemaMigrationResult>

The result of the migration execution.

PlanMigrationAsync(SchemaMigrationRequest, CancellationToken)

Plans a schema migration from one version to another.

Task<SchemaMigrationPlan> PlanMigrationAsync(SchemaMigrationRequest request, CancellationToken cancellationToken)

Parameters

request SchemaMigrationRequest

The migration planning request.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<SchemaMigrationPlan>

A migration plan detailing the steps required.

ValidateBackwardsCompatibilityAsync(object, object, CancellationToken)

Validates that a schema change is backwards compatible.

Task<SchemaCompatibilityResult> ValidateBackwardsCompatibilityAsync(object currentSchema, object newSchema, CancellationToken cancellationToken)

Parameters

currentSchema object

The current schema definition.

newSchema object

The proposed new schema definition.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<SchemaCompatibilityResult>

A validation result indicating compatibility.