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

Collation options on collections or indices ignored during find

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Index Maintenance, Querying
    • None
    • ALL
    • Hide

      db.createCollection('collationTest', { collation: { 'locale' : 'en_US_POSIX', 'caseLevel' : false, 'strength' : 1}});
      db.collationTest.insert( { 'last' : 'Smith', 'first' : 'Snuffy' } );
      db.collationTest.insert( { 'last' : 'Smith', 'first' : 'John' } );
      db.collationTest.insert( { 'last' : 'Luggenut', 'first' : 'Otto' } );
       
      > db.collationTest.find( { 'last' : 'smith' } );
      null
       
      db.collationTest.find( { 'last' : 'Smith' } );
      { "_id" : ObjectId("5d74618dd913165407782183"), "last" : "Smith", "first" : "Snuffy" }
      { "_id" : ObjectId("5d74da59d913165407782185"), "last" : "Smith", "first" : "John" }
      

      Show
      db.createCollection('collationTest', { collation: { 'locale' : 'en_US_POSIX', 'caseLevel' : false, 'strength' : 1}}); db.collationTest.insert( { 'last' : 'Smith', 'first' : 'Snuffy' } ); db.collationTest.insert( { 'last' : 'Smith', 'first' : 'John' } ); db.collationTest.insert( { 'last' : 'Luggenut', 'first' : 'Otto' } );   > db.collationTest.find( { 'last' : 'smith' } ); null   db.collationTest.find( { 'last' : 'Smith' } ); { "_id" : ObjectId("5d74618dd913165407782183"), "last" : "Smith", "first" : "Snuffy" } { "_id" : ObjectId("5d74da59d913165407782185"), "last" : "Smith", "first" : "John" }

    Description

      Collections created after upgrade from mongo server 4.0 to 4.2 ignore collation options when querying same for indexing.

      Attachments

        Activity

          People

            daniel.hatcher@mongodb.com Danny Hatcher (Inactive)
            marsh.giguere@gmail.com Marshall Giguere
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: