summaryrefslogtreecommitdiff
path: root/src/mongo/db/fts/fts_spec.cpp
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2016-02-23 12:59:07 -0500
committerDavid Storch <david.storch@10gen.com>2016-02-25 16:29:26 -0500
commitfe34b917cddb70f5a38ab199194f891eb9286925 (patch)
tree3b81844cd2c7c5d2b7f96912b917de59464e037f /src/mongo/db/fts/fts_spec.cpp
parentdac2b0d7269341c6033170aef76352bba2663422 (diff)
downloadmongo-fe34b917cddb70f5a38ab199194f891eb9286925.tar.gz
SERVER-13026 clarify error message for invalid text index weights
Diffstat (limited to 'src/mongo/db/fts/fts_spec.cpp')
-rw-r--r--src/mongo/db/fts/fts_spec.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/fts/fts_spec.cpp b/src/mongo/db/fts/fts_spec.cpp
index f825cce4ce7..9a5a4f78bc6 100644
--- a/src/mongo/db/fts/fts_spec.cpp
+++ b/src/mongo/db/fts/fts_spec.cpp
@@ -364,7 +364,10 @@ BSONObj FTSSpec::fixSpec(const BSONObj& spec) {
{
BSONObjBuilder b;
for (map<string, int>::iterator i = m.begin(); i != m.end(); ++i) {
- uassert(16674, "score for word too high", i->second > 0 && i->second < MAX_WORD_WEIGHT);
+ uassert(16674,
+ str::stream() << "text index weight must be in the exclusive interval (0,"
+ << MAX_WORD_WEIGHT << ") but found: " << i->second,
+ i->second > 0 && i->second < MAX_WORD_WEIGHT);
// Verify weight refers to a valid field.
if (i->first != "$**") {