[SERVER-14315] mongoimport doesn't support $maxKey and $minKey extended JSON Created: 19/Jun/14 Updated: 11/Jul/16 Resolved: 25/Jun/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Tools |
| Affects Version/s: | 2.6.2 |
| Fix Version/s: | 2.7.3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Robert Stam | Assignee: | Shaun Verch |
| Resolution: | Done | Votes: | 0 |
| Labels: | cap-ticket-needed, community-team | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||
| Issue Links: |
|
||||
| Operating System: | ALL | ||||
| Steps To Reproduce: |
|
||||
| Sprint: | Server 2.7.3 | ||||
| Participants: | |||||
| Description |
|
When importing the following file using mongoimport:
mongoimport does not appear to be processing the $maxKey and $minKey extended JSON syntax correctly. It's hard to tell using the shell:
but the x values are actually nested documents, and not MaxKey and MinKey respectively. |
| Comments |
| Comment by Githook User [ 25/Jun/14 ] | |||||||||||||||
|
Author: {u'name': u'Shaun Verch', u'email': u'shaun.verch@mongodb.com'}Message: | |||||||||||||||
| Comment by Shaun Verch [ 19/Jun/14 ] | |||||||||||||||
|
Ah, my mistake. I was using "MinKey()" rather than "MinKey" which apparently converts it to a string first. Thanks! | |||||||||||||||
| Comment by Robert Stam [ 19/Jun/14 ] | |||||||||||||||
|
This is what I got:
But this isn't using the same collection that is the result of the mongoimport test... I created these values using the shell, to ensure that the x values are real MaxKey and MinKey values:
| |||||||||||||||
| Comment by Shaun Verch [ 19/Jun/14 ] | |||||||||||||||
|
Hi rstam, I get this from mongoexport:
It looks like it's dumping an escaped "minKey object" as a string rather than a sub object. Are you getting something different? If not, this looks like a bug in mongoexport as well. | |||||||||||||||
| Comment by Robert Stam [ 19/Jun/14 ] | |||||||||||||||
|
Note that mongoexport seems to be doing the right thing, exporting MaxKey and MinKey using the correct extended JSON format. It's only mongoimport that seems to not know about $maxKey and $minKey. |