Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mongo-index-sync

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongo-index-sync

Update a live MongoDB database's indexes based on files in source control

  • 0.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

mongo-index-sync

Update a live MongoDB database's indexes based on files in source control

This project started because of the following paragraph in the MongoDB documentation (http://docs.mongodb.org/manual/reference/method/db.collection.ensureIndex/):

If you create an index with one set of options, and then issue the ensureIndex() method with the same index fields and different options without first dropping the index, ensureIndex() will not rebuild the existing index with the new options.

In addition to the above, some basic testing has demonstrated that, if present, the index name field acts as a unique identifier in place of the combination of fields. Therefore, if you have an index named searchByDomain with a single field domainName, re-running ensureIndex with a second field customerId and name searchByDomain will do nothing.

This is probably ok for many development environments, but if you want to promote index changes from dev to test to production, it is important to know that they will each enter the desired state regardless of what was there before.

Keywords

FAQs

Package last updated on 21 May 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc