When you create a new index for MongoDB collection in Moon Modeler, the Index Assistant window will appear.
Indexes can be defined easily. Just select the fields, either from the drop down element:
or by typing the field name directly. The auto-completion feature is available for you.
Click the Add button to insert the field to the index.
Then use the user interface to comfortably set up:
- options for all indexes
- options for text indexes
- options for 2dsphere indexes
- options for wildcard indexes
- and the collation as well
In addition, you can modify or refine everything with your own code on tab Code.
The preview of the resulting createIndex statement is displayed on the last tab of the Index Assistant window.
Generated code for MongoDB indexes
The script for creating indexes is included in the generated script for the project. You can find it below the script generated for the collection.
HTML reports and MongoDB indexes
MongoDB indexes are also included in the interactive HTML reports.