summaryrefslogtreecommitdiff
path: root/src/mongo/db
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2013-01-14 10:54:30 -0500
committerEliot Horowitz <eliot@10gen.com>2013-01-14 10:54:30 -0500
commit8af04aac6b443b448b4bad7f97e6ae28aebce95a (patch)
tree120c0970fdc38add24ee964966ca455f2901ff32 /src/mongo/db
parente3ab2ed4f9612a0b6b9e8cf0505e4b979b511472 (diff)
downloadmongo-8af04aac6b443b448b4bad7f97e6ae28aebce95a.tar.gz
SERVER-8126: don't allow an array as a prefix of a text index
Diffstat (limited to 'src/mongo/db')
-rw-r--r--src/mongo/db/fts/fts_index_format.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/db/fts/fts_index_format.cpp b/src/mongo/db/fts/fts_index_format.cpp
index b39b336d651..56df0e219e5 100644
--- a/src/mongo/db/fts/fts_index_format.cpp
+++ b/src/mongo/db/fts/fts_index_format.cpp
@@ -51,6 +51,8 @@ namespace mongo {
BSONElement e = obj.getFieldDotted(spec.extraBefore(i));
if ( e.eoo() )
e = nullElt;
+ uassert( 16675, "cannot have a multi-key as a prefix to a text index",
+ e.type() != Array );
extrasBefore.push_back(e);
extraSize += e.size();
}