Add Indexes and Create Collections

Add indexes according to the index definitions saved in your MongoDB database, and create collections (that include the indexes) based on the partition-method configuration saved to your MongoDB database.

Before you begin

If needed, add custom indexes for:
  • (General Ledger only) GL-information processing. If you plan to use MATRIXX GL utilities to process GL information from the Event Repository, see the discussion about adding indexes to MongoDB for general ledger.
  • Adding TTL to statuses and trace collections. For more information, see the discussion about adding indexes for TTL to the stats and trace collections.

Add all index definitions before running the create_event_repository_partitions.py script.

About this task

If you plan to load event objects into a single collection (no partitioning), run this script only once. If you plan to load event objects into multiple collections (partitioning is used), run this script at regular intervals (such as a cron job) so that new partitions are created.

Procedure

Enter the following command to create the configured set of indexes.
create_event_repository_partitions.py

(Multiple collections only) When loading event objects into multiple collections (partitioning is used), you can run the script using the daysAhead option to create enough event collections, and the associated indexes, to cover the specified number of days by typing the following command:

create_event_repository_partitions.py --daysAhead=numberDays

Where the script creates all the collections and indexes (for all indexes defined in the MtxEventDatabase configuration collection) needed for the next number of days (numberDays) specified.

For example, if you run the create_event_repository_partitions.py script with the daysAhead option set to a value of 30, the script creates all the collections and indexes needed for the next 30 days. Unless an unusual change is required, you do not need to run the script again for 30 days. It is acceptable to run the script more often than necessary because existing collections will not be modified.

What to do next

After adding your indexes, you are ready to install MATRIXX Engine (if you have not already done so) and configure it for the Event Repository by running the create_config.py script and answering the event-store related questions. For a description of the Event Repository information you will be prompted to enter when running the create_config.py script, see the discussion about Event Repository configuration.