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

text indexing picks up strings in arrays ignoring remaining dotted path

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 2.4.0, 2.4.1, 2.4.2, 2.4.3
    • Fix Version/s: 2.5.3
    • Component/s: Text Search
    • Labels:
    • Operating System:
      ALL

      Description

      > use test2
      switched to db test2
      > db.tweets.save( {_id:1,comments:["this is important",{b:"this is unimportant"},"green",{b:"blue"}]} );
      > db.tweets.ensureIndex({ "comments.b" : "text" });
      > db.tweets.runCommand("text",{ search : "unimportant" });
      {
      	"queryDebugString" : "unimport||||||",
      	"language" : "english",
      	"results" : [
      		{
      			"score" : 1,
      			"obj" : {
      				"_id" : 1,
      				"comments" : [
      					"this is important",
      					{
      						"b" : "this is unimportant"
      					},
      					"green",
      					{
      						"b" : "blue"
      					}
      				]
      			}
      		}
      	],
      	"stats" : {
      		"nscanned" : 1,
      		"nscannedObjects" : 0,
      		"n" : 1,
      		"nfound" : 1,
      		"timeMicros" : 122
      	},
      	"ok" : 1
      }
      > db.tweets.runCommand("text",{ search : "important" });
      {
      	"queryDebugString" : "import||||||",
      	"language" : "english",
      	"results" : [
      		{
      			"score" : 1,
      			"obj" : {
      				"_id" : 1,
      				"comments" : [
      					"this is important",
      					{
      						"b" : "this is unimportant"
      					},
      					"green",
      					{
      						"b" : "blue"
      					}
      				]
      			}
      		}
      	],
      	"stats" : {
      		"nscanned" : 1,
      		"nscannedObjects" : 0,
      		"n" : 1,
      		"nfound" : 1,
      		"timeMicros" : 89
      	},
      	"ok" : 1
      }

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: