[SERVER-13020] db.currentOp() with $text in predicate should generate error Created: 04/Mar/14  Updated: 04/Nov/15  Resolved: 04/Nov/15

Status: Closed
Project: Core Server
Component/s: Text Search
Affects Version/s: 2.6.0-rc0
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: J Rassi Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-21285 currentOp ignores $near and $text pre... Closed
Operating System: ALL
Participants:

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



 Comments   
Comment by J Rassi [ 04/Nov/15 ]

Closing as a dup of SERVER-21285.

Generated at Thu Feb 08 03:30:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.