[SERVER-2441] ensureIndex records arbitrary direction objects Created: 31/Jan/11 Updated: 22/Feb/12 Resolved: 31/Jan/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Trivial - P5 |
| Reporter: | Scott Hernandez (Inactive) | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
> db.test5.ensureIndex( {x:"foo"}) }, , It seems like it should be 1 of the 3 possible values when it is stored. |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 31/Jan/11 ] |
|
Added a note on |
| Comment by Scott Hernandez (Inactive) [ 31/Jan/11 ] |
|
Maybe the right time is when we transition to the createIndex command over inserting into the collection. |
| Comment by Eliot Horowitz (Inactive) [ 31/Jan/11 ] |
|
Definitely a larger change, but I'd rather go to the fully correct solution at some point, then a mediocre interim solution. |
| Comment by Scott Hernandez (Inactive) [ 31/Jan/11 ] |
|
They are both breaking changes, but it seems like validation and exceptions will break more existing code. I'm all behind that, but it seems like a larger user-facing change. |
| Comment by Eliot Horowitz (Inactive) [ 31/Jan/11 ] |
|
I don't want to change the value you put in. |
| Comment by Scott Hernandez (Inactive) [ 31/Jan/11 ] |
|
I understand being lenient and I'm not asking for validation or exceptions just recording of consistent values. In the indexing code each index is create either ascending, descending, or 2d (geo). When writing an administrative app you need some consistency. |
| Comment by Eliot Horowitz (Inactive) [ 31/Jan/11 ] |
|
"foo" in general would be an index type. Now arguably we should throw an exception for an invalid index, but we decided not to a while ago since we didn't want to break users. |
| Comment by Scott Hernandez (Inactive) [ 31/Jan/11 ] |
|
What does "foo" mean in this context? |
| Comment by Eliot Horowitz (Inactive) [ 31/Jan/11 ] |
|
"foo" is valid. |