diff options
author | Xin Hao Zhang <xinhao.zhang@mongodb.com> | 2019-06-03 14:26:14 -0400 |
---|---|---|
committer | Xin Hao Zhang <xinhao.zhang@mongodb.com> | 2019-06-03 14:26:14 -0400 |
commit | 9deda22adbf2683fb7e1c14f906238c843c31002 (patch) | |
tree | afd5b6d824c496e52a838d3fec6d7111b32b48af | |
parent | 9d212e4f098ccf4821fd6a1acde60402373b70ee (diff) | |
download | mongo-9deda22adbf2683fb7e1c14f906238c843c31002.tar.gz |
SERVER-41394 Improve error message for wildcard index creation
-rw-r--r-- | src/mongo/db/catalog/index_key_validate.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/catalog/index_key_validate.cpp b/src/mongo/db/catalog/index_key_validate.cpp index 01d822f6a29..52b3193fd09 100644 --- a/src/mongo/db/catalog/index_key_validate.cpp +++ b/src/mongo/db/catalog/index_key_validate.cpp @@ -305,7 +305,8 @@ StatusWith<BSONObj> validateIndexSpec( (IndexNames::findPluginName(indexSpec.getObjectField( IndexDescriptor::kKeyPatternFieldName)) == IndexNames::WILDCARD)) { return {ErrorCodes::CannotCreateIndex, - str::stream() << "Unknown index plugin '" << IndexNames::WILDCARD << "'"}; + str::stream() + << "Wildcard indexes require feature compatibility version 4.2"}; } hasKeyPatternField = true; } else if (IndexDescriptor::kIndexNameFieldName == indexSpecElemFieldName) { |