diff options
author | Hari Khalsa <hkhalsa@10gen.com> | 2014-04-24 08:58:00 -0400 |
---|---|---|
committer | Hari Khalsa <hkhalsa@10gen.com> | 2014-04-24 09:09:00 -0400 |
commit | 8ef75e363a3ea17f6a5f7be55460c528c6bae32f (patch) | |
tree | e9cc6a5e194a66b18ce2b13ff5000b5283d7e740 /jstests/core/stages_text.js | |
parent | 7f8f4b7d140639b00b59047e600c9c793da3a3de (diff) | |
download | mongo-8ef75e363a3ea17f6a5f7be55460c528c6bae32f.tar.gz |
SERVER-13632 clean up stagedebug cmd so passing collection around is easlier
Diffstat (limited to 'jstests/core/stages_text.js')
-rw-r--r-- | jstests/core/stages_text.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/jstests/core/stages_text.js b/jstests/core/stages_text.js index 8407ffe1e14..077416b98af 100644 --- a/jstests/core/stages_text.js +++ b/jstests/core/stages_text.js @@ -2,16 +2,20 @@ t = db.stages_text; t.drop(); +var collname = "stages_text"; + t.save({x: "az b x"}) t.ensureIndex({x: "text"}) // We expect to retrieve 'b' -res = db.runCommand({stageDebug: {text: {args: {name: "test.stages_text", search: "b"}}}}); +res = db.runCommand({stageDebug: {collection: collname, + plan: {text: {args: {search: "b"}}}}}); assert.eq(res.ok, 1); assert.eq(res.results.length, 1); // I have not been indexed yet. -res = db.runCommand({stageDebug: {text: {args: {name: "test.stages_text", search: "hari"}}}}); +res = db.runCommand({stageDebug: {collection: collname, + plan: {text: {args: {search: "hari"}}}}}); assert.eq(res.ok, 1); assert.eq(res.results.length, 0); |