MongoDB Error 85 IndexOptionsConflict (Only One Text Index Per Collection)
Attempted to create a second text index on a collection that already has one.
Runs locally in browser
Free · No login
Independently Verified 2026-11-25
v4.1.0
Identifier: MongoDB Error 85 IndexOptionsConflict (Only One Text Index Per Collection)
Platform: MongoDB
Common Root Causes:
- Attempted to create a second text index on a collection that already has one.
Interactive Diagnostic Checklist
Verified Solutions:
- Drop the existing text index and create a single compound text index covering all needed fields.
Safe Diagnostic Command:
db.<coll>.getIndexes()
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.
Technical Explanation
Attempted to create a second text index on a collection that already has one. Recommended diagnostic: `db.<coll>.getIndexes()`. Remediation: Drop the existing text index and create a single compound text index covering all needed fields.
Worked Examples
- Run `db.<coll>.getIndexes()` to verify root cause before applying the remediation.
Limitations & Assumptions
- Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.
Source References & Verification
Resource ID: err-mongodb-text-index-already-exists · Independently verified: 2026-11-25