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

issue querying data

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Querying
    • None
    • ALL

    Description

      I just came across an interesting issue in 2.4.9. Not sure if this is a know issue or not but I thought I'll send it across.
      If you create a document with a char attribute that's longer than 1011 characters a search via a regular express will not find it yet if you give it a hint to use the id index the document will be found. BTW, the problem is fixed in 2.6.1, ie not a problem for us anymore since we are already upgrading to 2.6.1.

      Insert the 2 test records below into collection test on a 2.4.9 instance and the first query returns 1 document, the second query returns 2 documents. In 2.6.1 both queries return 2 documents. Only difference between the documents is that attribute c has 1 additional character.

      Thanks
      Robert

      db.test.find(

      {"c" : /123456789/}

      )
      db.test.find(

      {"c" : /123456789/}

      ).hint("id")

      {
      "_id" : "1",
      "c" : "012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
      }
      {
      "_id" : "2",
      "c" : "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901"
      }

      Attachments

        Activity

          People

            thomas.rueckstiess@mongodb.com Thomas Rueckstiess
            rfehrmann@snagajob.com Robert Fehrmann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: