# MongoDB Atlas Search index sync failed: Index 'search_idx' on collection 'products' in sync state 'FAILED'

- **ID:** `mongodb/atlas-search-index-sync-failure`
- **Domain:** mongodb
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

An Atlas Search index definition contains an invalid mapping (e.g., referencing a non-existent field, using an unsupported analyzer, or exceeding field limit), causing the index synchronization process to fail.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| MongoDB Atlas (M10+ clusters) | active | — | — |
| Atlas Search 1.0 | active | — | — |
| Atlas Search 2.0 | active | — | — |

## Workarounds

1. **Check the Atlas UI for detailed error messages in the Search Index details panel. Common fixes: remove unsupported field types (e.g., arrays of mixed types) or correct analyzer names (e.g., 'lucene.standard' instead of 'standard').** (85% success)
   ```
   Check the Atlas UI for detailed error messages in the Search Index details panel. Common fixes: remove unsupported field types (e.g., arrays of mixed types) or correct analyzer names (e.g., 'lucene.standard' instead of 'standard').
   ```
2. **Use the Atlas Search API to retrieve the index status: `curl -s -u "username:apiKey" "https://cloud.mongodb.com/api/atlas/v1.0/groups/{groupId}/clusters/{clusterName}/fts/indexes/{indexId}" | jq '.status'`. Then update the index definition with corrected mappings.** (80% success)
   ```
   Use the Atlas Search API to retrieve the index status: `curl -s -u "username:apiKey" "https://cloud.mongodb.com/api/atlas/v1.0/groups/{groupId}/clusters/{clusterName}/fts/indexes/{indexId}" | jq '.status'`. Then update the index definition with corrected mappings.
   ```
3. **Simplify the index definition to only include essential fields, then gradually add fields while monitoring sync status.** (75% success)
   ```
   Simplify the index definition to only include essential fields, then gradually add fields while monitoring sync status.
   ```

## Dead Ends

- **** — The underlying mapping error persists; the new index will also fail to sync. (95% fail)
- **** — The failure is due to schema validation, not resource constraints. (90% fail)
- **** — Atlas Search sync is asynchronous and does not re-validate the index definition on document insertion. (85% fail)
