[SERVER-17322] Different output for Mongo shell and java/python driver Created: 18/Feb/15 Updated: 19/Feb/15 Resolved: 19/Feb/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | sandip | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Steps To Reproduce: | 1. Load dataset populationBefore.txt ) the output is not proper. ) the output is different from mongoshell and not at all correct Strange behavior. 5. I try with attached population.txt , load the data and works expected every where. |
| Participants: |
| Description |
|
I have a data set , which I have attached . Now with this dataset mongodb behavior is unpredictable . I am very interested to know the reason. Let?s for example , I load the data into mongodb :
In the result you can see no CARROLL is found . ? Same Query from Mongodb.
Bothe JAVA/PYTHON driver returns different result set from mongodb . I am very interested to know why is this behavior ? How mongodb treating things differently from java/python driver ? How mongodb stored multiple JSON object with same key ? |
| Comments |
| Comment by Asya Kamsky [ 19/Feb/15 ] | |||||||||||||||||||||||||||||||
|
This would be better discussed on mongodb-user Google group. Please note that you are connecting to mongos with mongo shell, so you should verify whether you are querying the same database, the same collection, etc. | |||||||||||||||||||||||||||||||
| Comment by sandip [ 19/Feb/15 ] | |||||||||||||||||||||||||||||||
|
Thank you for the comment . My question was why then Mongoshell and java/python driver return different result set ? | |||||||||||||||||||||||||||||||
| Comment by Asya Kamsky [ 19/Feb/15 ] | |||||||||||||||||||||||||||||||
|
The two files (population.txt and populationBefore.txt) have different contents. Each one has one document, in one there is a single field population and its contents are a single subdocument, the other the field population is an array of subdocuments. In populationBefore.txt your population document has multiple subdocuments which all have the same field name:
This is not legal document, so all the profile subfields collapse into one. |