summaryrefslogtreecommitdiff
path: root/jstests/core/fts_querylang.js
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2015-10-12 18:50:25 -0400
committerMark Benvenuto <mark.benvenuto@mongodb.com>2015-10-22 20:18:00 -0400
commit4c38ff13739e60d33d52b0c944d55249e7d9cc68 (patch)
tree418c999e71a795cebf5fd10eb49e9f36d7dece41 /jstests/core/fts_querylang.js
parentd10f7021460e8166a7294170451d91da42b5cc70 (diff)
downloadmongo-4c38ff13739e60d33d52b0c944d55249e7d9cc68.tar.gz
SERVER-20888: Defer $language check to FTSQuery::Parse
Diffstat (limited to 'jstests/core/fts_querylang.js')
-rw-r--r--jstests/core/fts_querylang.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/jstests/core/fts_querylang.js b/jstests/core/fts_querylang.js
index 2a139f5b766..1701273b0a0 100644
--- a/jstests/core/fts_querylang.js
+++ b/jstests/core/fts_querylang.js
@@ -49,6 +49,11 @@ results = t.find({$text: {$search: "content -irrelevant"},
assert.eq(results.length, 1);
assert.eq(results[0]._id, 1);
+// Test $and of basic text query with indexed expression, and bad language
+assert.throws(function() {
+ t.find({$text: {$search: "content -irrelevant", $language: "spanglish"}, _id: 1})
+ .itcount()});
+
// Test $and of basic text query with unindexed expression.
results = t.find({$text: {$search: "content -irrelevant"},
unindexedField: 1}).toArray();