Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NODE-2591
PR to implement the feature "hidden indexes".Uses a new
HideIndexOperation
to send the command specified in SPEC-1678's scope. This one operation handles both hiding indexes and unhiding index. I didn't see the point in creating two new operations when it's just a matter of adding a boolean option.I didn't have access to the collection name within the operation so I added it in from the parent, this is because the
ns
replaces the collection with$cmd
. Would love to know a better way of doing this if there is one.Adds
hidden
option tocreateIndex
and test for that as well.I made an attempt at adding in the
'expireAfterSeconds'
option to.hideIndex()
but when sent I got this error:So I figured it may not need to be added.Adds
hidden
option toIndexOptions
.