diff options
author | Eliot Horowitz <eliot@10gen.com> | 2013-01-14 10:54:30 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2013-01-14 10:54:30 -0500 |
commit | 8af04aac6b443b448b4bad7f97e6ae28aebce95a (patch) | |
tree | 120c0970fdc38add24ee964966ca455f2901ff32 /src/mongo/db | |
parent | e3ab2ed4f9612a0b6b9e8cf0505e4b979b511472 (diff) | |
download | mongo-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.cpp | 2 |
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(); } |