db.currentOp() with $text in predicate should generate error

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Minor - P4
    • None
    • Affects Version/s: 2.6.0-rc0
    • Component/s: Text Search
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      It should be an error to use $text in a match expression in any context other than a query predicate.

      > db.currentOp({$text:{$search:"hello"}}) // makes no sense, should generate error
      {
      	"inprog" : [
      		{
      			"opid" : 152,
      			"active" : true,
      			"secs_running" : 85,
      			"op" : "query",
      			"ns" : "test",
      			"query" : {
      				"$eval" : "sleep(1000000)"
      			},
      			"client" : "127.0.0.1:52472",
      			"desc" : "conn2",
      			"threadId" : "0x10e187000",
      			"connectionId" : 2,
      			"locks" : {
      				"^" : "W"
      			},
      			"waitingForLock" : false,
      			"numYields" : 0,
      			"lockStats" : {
      				"timeLockedMicros" : {
      
      				},
      				"timeAcquiringMicros" : {
      					"R" : NumberLong(0),
      					"W" : NumberLong(2)
      				}
      			}
      		}
      	]
      }
      >
      

              Assignee:
              Unassigned
              Reporter:
              J Rassi (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: