Search Drift Detection
Compare design-time search schemas against deployed index schemas to identify field removals, additions, type changes, and analyser mismatches.
Search drift detection compares the search schema defined in NeoArc Studio's graph model against the actual schema deployed to your search engine. The SearchDriftDetectionService identifies fields that have been removed, added, or changed between design-time and deployment, producing a structured drift report.
How Drift Detection Works
Design-Time Schema Export
The exportDesignSchema method generates the expected index schema from the graph model and active search profile.
interface DesignTimeSchema {
indexName: string; // Resolved from entity name via profile's indexNamingConvention
entityName: string; // Source entity name
engine: string; // Search engine vendor
fields: DesignTimeField[];
}
Design-Time Field Structure
Each field in the design-time schema contains the following properties.
interface DesignTimeField {
fieldName: string; // Resolved field name (after casing transformation)
canonicalName: string; // Original canonical property name
canonicalType: string; // Canonical type from the model
resolvedType: string; // Engine-specific type (via profile type mapping)
searchFieldType?: string; // Search field type override (if set)
isKey: boolean; // Whether this is the document key
behaviours: string[]; // Search behaviours
analyzer?: string; // Analyser
}
Field Name Resolution
When resolving a field's name in the search index, the following priority applies.
Drift Item Types
The drift detection engine produces four types of drift items, each with a severity level that indicates the impact on your deployed index.
Drift Report Structure
interface DriftReport {
indexName: string; // Entity/index name
totalDrifts: number; // Total number of drift items
errors: DriftItem[]; // Breaking changes (field-removed)
warnings: DriftItem[]; // Potential issues (type-changed, analyzer-changed)
infos: DriftItem[]; // Informational items (field-added)
items: DriftItem[]; // All drift items combined
isClean: boolean; // True when no drift exists
}
Deployed Field Input
The deployed schema is provided as an array of DeployedField objects, normalised from the engine's native mapping format.
interface DeployedField {
fieldName: string; // Field name in the deployed index
type: string; // Engine-specific type
analyzer?: string; // Analyser name
}