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

Collation options on collections or indices ignored during find

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Index Maintenance, Querying
    • Labels:
      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" }

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

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

              Created:
              Updated:
              Resolved: