# ElasticsearchException: Rollup job [my_rollup] cannot be started because the index pattern [logs-*] does not match any existing indices

- **ID:** `elasticsearch/rollup-job-not-matching-indices`
- **Domain:** elasticsearch
- **Category:** config_error
- **Error Code:** `ROLLUP_NO_MATCHING_INDICES`
- **Verification:** ai_generated
- **Fix Rate:** 82%

## Root Cause

The rollup job's index pattern does not match any indices in the cluster, preventing job initialization.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Elasticsearch 7.13 | active | — | — |
| Elasticsearch 8.3 | active | — | — |
| Elasticsearch 8.12 | active | — | — |

## Workarounds

1. **Verify existing indices with `GET _cat/indices/logs-*` and adjust the rollup job pattern to match: `PUT _rollup/job/my_rollup/_stop` then `PUT _rollup/job/my_rollup {"index_pattern": "logs-2025-*"}`** (90% success)
   ```
   Verify existing indices with `GET _cat/indices/logs-*` and adjust the rollup job pattern to match: `PUT _rollup/job/my_rollup/_stop` then `PUT _rollup/job/my_rollup {"index_pattern": "logs-2025-*"}`
   ```
2. **Create sample data indices matching the pattern before starting the job: `POST logs-2025-01/_doc {"timestamp": "2025-01-01", "value": 10}`** (85% success)
   ```
   Create sample data indices matching the pattern before starting the job: `POST logs-2025-01/_doc {"timestamp": "2025-01-01", "value": 10}`
   ```

## Dead Ends

- **Creating an empty index matching the pattern (e.g., `PUT logs-2025`) without data** — The rollup job may start but will produce no results, and the empty index may cause other issues. (60% fail)
- **Modifying the rollup job to use a wildcard pattern like `*`** — This may match unintended indices, causing performance degradation or incorrect rollups. (70% fail)
- **Restarting the rollup job without checking index existence** — The same error will recur as the index pattern remains unmatched. (90% fail)
