# Elasticsearch mapping conflict: field 'timestamp' has different type in different indices

- **ID:** `data/elasticsearch-mapping-conflict`
- **Domain:** data
- **Category:** schema_error
- **Error Code:** `illegal_argument_exception`
- **Verification:** ai_generated
- **Fix Rate:** 84%

## Root Cause

When creating an index pattern or alias that spans multiple indices, Elasticsearch detects that the same field has incompatible types (e.g., 'date' in one index and 'text' in another), preventing unified search.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Elasticsearch 7.17 | active | — | — |
| Elasticsearch 8.6 | active | — | — |
| Elasticsearch 8.11 | active | — | — |

## Workarounds

1. **Reindex the conflicting indices into a new index with a unified mapping, then use an alias to point to the new index.** (90% success)
   ```
   Reindex the conflicting indices into a new index with a unified mapping, then use an alias to point to the new index.
   ```
2. **Use a runtime field in the index pattern to cast the conflicting field to a common type at query time.** (75% success)
   ```
   Use a runtime field in the index pattern to cast the conflicting field to a common type at query time.
   ```

## Dead Ends

- **** — Data in the deleted index is lost unless reindexed, which can be time-consuming. (90% fail)
- **** — Dynamic mapping can still produce conflicting types across indices. (80% fail)
