[SERVER-3981] Creating a compound sparse index should uassert Created: 30/Sep/11 Updated: 10/Dec/14 Resolved: 15/Aug/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Kristina Chodorow (Inactive) | Assignee: | Randolph Tan |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Description |
|
It looks like there's a uassert in indexkey.cpp, but it isn't correct. I think it should be: uassert( 13529 , "sparse only works for single field keys" , ! _sparse || _nFields == 1 ); Example: admin> db.foo.ensureIndex( {x:1,y:1}, {sparse:true,unique:true}) , , |
| Comments |
| Comment by Randolph Tan [ 15/Aug/13 ] |
|
Current master branch allows compound sparse index (although it may not fit some other use cases - see |
| Comment by Eliot Horowitz (Inactive) [ 01/Oct/11 ] |
|
multi key sparse indexes do work |