Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-22885

Unable to find some of filed in document which were imported by mondoimport.

    XMLWordPrintable

    Details

    • Type: Question
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 3.2.1
    • Fix Version/s: None
    • Component/s: Querying
    • Labels:
      None

      Description

      I am testing MongoDB to find out if it would be a solution to automate a task.

      To achieve this task, I have to import around 20,000 xml files in to MondoDB collection which I think it's really suite for MondodB.

      I tested with mongo v3.2 and mongo compass to verify most possible queries what I need to use.

      While I am testing after import 2 xml files after I converted to json format, found some of queries are returned with no values but some of them are OK.

      Following is successful case;

      > a.find ( {"ChangeHolderProfile.SequenceOrderPerMedia":1} ).pretty()
      {
              "_id" : ObjectId("56d15af5c1b54590d5dc1f50"),
              "ActionList" : {
                      "publishedDateID" : "20140104000021",
                      "xsdVersion" : 2,
                      "externalVersion" : 487,
                      "managerRefNumber" : 2
              },
              "ReloadTPurse" : {
                      "CardGenerationNumber" : 0,
                      "CardSerialNumber" : NumberLong("1184365732964992"),
                      "ExpirationDate" : "2014-03-04T00:00:00.000+13:00",
                      "RefNumber" : 284617,
                      "SequenceOrderPerMedia" : 4,
                      "ValueToAdd" : 2975,
                      "FeeValue" : 25,
                      "FeeGSTValue" : 0
              },
              "ChangeHolderProfile" : {
                      "CardGenerationNumber" : 0,
                      "CardSerialNumber" : NumberLong("1201849732246144"),
                      "ExpirationDate" : "2014-03-04T00:00:00.000+13:00",
                      "RefNumber" : 284616,
                      "SequenceOrderPerMedia" : 1,
                      "HolderBirthDate" : "1996-03-08+13:00",
                      "HolderProfileID" : 0,
                      "HolderProfileValidityDate" : "1990-01-01+13:00"
              }
      }
      

      Following case has returned no values

       >  db.actionlist1.find( {"ReloadTPurse.CardSerialNumber":1208467063778432})
      >
      

      I have tested same case with Mongo compass but result are same.

      All of data in this case is test data so I have attached a sample json file here so please advise me why I could not get any data when I query with CardSerialNumber ?

        Attachments

        1. 20140104000021-2.json
          2 kB
        2. after apply.JPG
          after apply.JPG
          54 kB
        3. Before apply.JPG
          Before apply.JPG
          101 kB
        4. Result.JPG
          Result.JPG
          22 kB
        5. Returend1.JPG
          Returend1.JPG
          85 kB
        6. Select media serial number.JPG
          Select media serial number.JPG
          48 kB

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: