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

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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor - P4 Minor - P4
    • None
    • 2.6.0-rc0
    • Text Search
    • ALL

    Description

      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)
      				}
      			}
      		}
      	]
      }
      >

      Attachments

        Activity

          People

            Unassigned Unassigned
            rassi J Rassi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: