MongoDB Indexes
MongoDB requires indexes for performance optimization and fast document retrieval. You can create indexes in MongoDB using the PTC Arbortext Content Delivery loader. The PTC Arbortext Content Delivery loader uses the indexes.xml file, located in WT_HOME/loadXMLFiles/scloaders to create the indexes.
The structure of the indexes.xml file located at WT_HOME/loadXMLFiles/scloaders is as follows:
<mongoindex>
<collection name="cartsCollection">
<column name="ownerShip,dealerShip" type="compound"/>
<column name="cartId" type="single"/>
</collection>
</mongoindex>
where,
Collection name is the name of the PTC Arbortext Content Delivery collection for which the indexes are to be created.
Column name is the name of the column from that collection, for which the index is added.
type is the type of MongoDB index such as Single, Compound, Text, and Hashed (only these four types are supported).
Use one of the following ways to create indexes in MongoDB:
Upgrade utility—Run the upgrade utility to create and refresh indexes.
SCLoader—Run the following command in the Windchill shell: windchill com.ptc.sc.loader.SCLoader – createMongoIndexes
The loader creates indexes using the details of the collections and column names in the indexes.xml file.
* 
Indexes are created by default for a new PTC Arbortext Content Delivery installation and during the base data load.
To verify the created MongoDB index,
1. Log on to MongoDB using the robomongo client.
2. Expand the collection for which the indexes are created, as shown in the following image.
Was this helpful?