[SERVER-4623] createIndex command does not fail from the shell when the index already exists Created: 05/Jan/12 Updated: 16/Aug/18 Resolved: 16/Aug/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | 2.0.2, 2.1.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Sridhar Nanjundeswaran | Assignee: | DO NOT USE - Backlog - Platform Team |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Participants: |
| Description |
|
db.foo.createIndex( {bar:1}) followed by the same command in the shell does not give an error. Expect this to throw an error when using createIndex as opposed to ensureIndex. |
| Comments |
| Comment by Asya Kamsky [ 16/Aug/18 ] | |||||||
|
This already works as the request describes:
| |||||||
| Comment by Swapnil Tailor [ 24/Jan/12 ] | |||||||
|
One question related to this issue, Why do we need two different functions for creation of indexes. |