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

Full text search does not find text in typographic quotes

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.4.10
    • Component/s: Index Maintenance
    • None
    • ALL
    • Hide
      > db.createCollection("test")
      { "ok" : 1 }
      > db.test.insert({"title": "hallo"})
      > db.test.insert({"title": "„hallo“"})
      > db.test.find()
      { "_id" : ObjectId("54c8737202907f6af18809a2"), "title" : "hallo" }
      { "_id" : ObjectId("54c8737202907f6af18809a3"), "title" : "„hallo“" }
      > db.test.ensureIndex({"title" : "text"})
      > db.test.runCommand("text", {"search": "hallo"})
      {
      	"queryDebugString" : "hallo||||||",
      	"language" : "english",
      	"results" : [
      		{
      			"score" : 1.1,
      			"obj" : {
      				"_id" : ObjectId("54c8737202907f6af18809a2"),
      				"title" : "hallo"
      			}
      		}
      	],
      	"stats" : {
      		"nscanned" : 1,
      		"nscannedObjects" : 0,
      		"n" : 1,
      		"nfound" : 1,
      		"timeMicros" : 97
      	},
      	"ok" : 1
      }
      
      Show
      > db.createCollection( "test" ) { "ok" : 1 } > db.test.insert({ "title" : "hallo" }) > db.test.insert({ "title" : "„hallo“" }) > db.test.find() { "_id" : ObjectId( "54c8737202907f6af18809a2" ), "title" : "hallo" } { "_id" : ObjectId( "54c8737202907f6af18809a3" ), "title" : "„hallo“" } > db.test.ensureIndex({ "title" : "text" }) > db.test.runCommand( "text" , { "search" : "hallo" }) { "queryDebugString" : "hallo||||||" , "language" : "english" , "results" : [ { "score" : 1.1, "obj" : { "_id" : ObjectId( "54c8737202907f6af18809a2" ), "title" : "hallo" } } ], "stats" : { "nscanned" : 1, "nscannedObjects" : 0, "n" : 1, "nfound" : 1, "timeMicros" : 97 }, "ok" : 1 }

      In my application I tend to use proper typographic quotes for names etc., like „hallo“ (to take a German example). If I do that, the text in quotes is not found by fulltext search. However, it should be found.

            Assignee:
            ramon.fernandez@mongodb.com Ramon Fernandez Marina
            Reporter:
            tgpfeiffer Tobias Pfeiffer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: