diff options
author | Zhihui Fan <yizhi.fzh@alibaba-inc.com> | 2020-02-04 08:09:01 +0800 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-04-22 16:47:37 +0000 |
commit | bad7c538e7efbc996a6089e1569681edf24e6b33 (patch) | |
tree | 07aa2c5b48062ed36d147a682f06beeb4d6f9f69 /src/mongo/db/index/index_descriptor.h | |
parent | 17edea396d470d0ddc258674feba030ffafbffe8 (diff) | |
download | mongo-bad7c538e7efbc996a6089e1569681edf24e6b33.tar.gz |
SERVER-9306 Ability to temporarily forbid query optimizer from using index ("Hidden Index") SERVER-47275 Take over and complete Hidden Indexes PR
Co-authored-by: Ruoxin Xu <ruoxin.xu@mongodb.com>
Diffstat (limited to 'src/mongo/db/index/index_descriptor.h')
-rw-r--r-- | src/mongo/db/index/index_descriptor.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/index/index_descriptor.h b/src/mongo/db/index/index_descriptor.h index b8d61b20564..4eab168a65a 100644 --- a/src/mongo/db/index/index_descriptor.h +++ b/src/mongo/db/index/index_descriptor.h @@ -82,6 +82,7 @@ public: static constexpr StringData kStorageEngineFieldName = "storageEngine"_sd; static constexpr StringData kTextVersionFieldName = "textIndexVersion"_sd; static constexpr StringData kUniqueFieldName = "unique"_sd; + static constexpr StringData kHiddenFieldName = "hidden"_sd; static constexpr StringData kWeightsFieldName = "weights"_sd; /** @@ -174,6 +175,10 @@ public: return _unique; } + bool hidden() const { + return _hidden; + } + // Is this index sparse? bool isSparse() const { return _sparse; @@ -255,6 +260,7 @@ private: bool _isIdIndex; bool _sparse; bool _unique; + bool _hidden; bool _partial; IndexVersion _version; BSONObj _collation; |