Search Profiles
Search profiles configure how model entities project into search indexes across supported engines including Elasticsearch, Azure Cognitive Search, OpenSearch, Typesense, Algolia, and custom engines. Includes operational strategies, index lifecycle management, and search drift detection.
Search infrastructure is often treated as a separate concern from the data model. A search engineer writes index mappings in JSON. A data architect designs entity-relationship models. The two artefacts exist in different repositories with no formal connection. When the data model changes, the search index may or may not be updated. When a new field is added to the search index, it may or may not correspond to a real model property.
Search profiles bridge this gap by making search index configuration a first-class part of the model. Each model property can carry search-specific metadata (searchable, filterable, sortable, analyser, boost, vector dimensions), and each search profile defines how abstract types map to engine-specific field types. The result is search index configuration that is traceable back to the model and governed by the same lifecycle and validation rules.
Supported Search Engines
Profile Configuration
Each search profile contains engine-level settings that apply to all entities projected through it.
| Setting | Purpose | Example |
|---|---|---|
| Engine vendor | Target search engine | Elasticsearch, Azure Cognitive Search, etc. |
| Naming convention | How property names are transformed for index fields | camelCase for Elasticsearch, PascalCase for Azure |
| Index naming convention | How entity names are transformed for index names | snake_case: Customer becomes customer |
| Type mappings | Abstract-to-concrete type mappings for the target engine | string maps to keyword, text maps to text |
| Default analyser | Fallback analyser when none specified on property | standard, english, custom |
| Synonym maps | Profile-scoped synonym definitions | Product synonyms: laptop, notebook, computer |
| Custom analysers | Profile-scoped analyser definitions with tokenisers and filters | Edge n-gram analyser for autocomplete |
| Shard count and replicas | Index infrastructure settings | 3 primary shards, 1 replica |
| Refresh interval | How often the index is refreshed for near-real-time search | 1 second, 30 seconds, manual |
Operational Strategies
Search profiles go beyond schema configuration to include operational concerns that are critical for production search infrastructure.
Index Lifecycle Management
For time-series and high-volume indexes, search profiles support lifecycle policies that move data through temperature tiers.
| Phase | Configuration | Purpose |
|---|---|---|
| Hot | Duration (e.g., 7 days) | Active writing and querying, highest performance tier |
| Warm | Duration + optional force merge | Read-optimised, reduced resources, merged segments for efficiency |
| Cold | Duration | Infrequent access, minimal resources, compressed storage |
| Delete | Duration | Data removed after retention period expires |
Rollover Configuration
Rollover policies control when a new index is created to prevent any single index from growing too large.
| Trigger | Configuration | Example |
|---|---|---|
| Max size | Size value with unit (MB, GB, TB) | Roll over at 50 GB |
| Max documents | Document count threshold | Roll over at 10 million documents |
| Max age | Duration value with unit | Roll over after 30 days |
Search Drift Detection
The Search Drift Detection service compares the design-time schema (model properties + search profile) against a deployed search index to identify discrepancies.
| Drift Type | Description | Severity |
|---|---|---|
| field-added | A field exists in the deployed index but not in the model | Warning |
| field-removed | A field exists in the model but not in the deployed index | Error |
| type-changed | The field type in the deployed index differs from the model projection | Error |
| analyzer-changed | The analyser configuration differs between model and deployed index | Warning |
| field-renamed | A field appears to have been renamed (matched by type and position) | Info |