Content Store Indexes
Database indexes are used to improve the performance of queries. The Content Store uses 16 indexes to optimize the performance of the queries it executes. The indexes are created automatically by Xill4 for small collections. However, if you have a large collection and the indexes are missing, you need to create them manually using the following commands. You directly paste these commands into the MongoDB shell at once.
First, open the MongoDB shell.
Next, select the database you want to create the indexes for. In this example the database is called extractionExample
.
use extractionExample
Last, create the indexes by pasting the following lines into the MongoDB shell. It could take a while to create all indexes.
db.documents.createIndex({"kind":1}, {"name":"kind"})
db.documents.createIndex({"migration.id":1}, {"name":"migrationId","unique":true,"sparse":true})
db.documents.createIndex({"migration.migrate":1}, {"name":"migrationMigrate"})
db.documents.createIndex({"migration.failed":1}, {"name":"migrationFailed"})
db.documents.createIndex({"source.id":1}, {"name":"sourceId","unique":true,"sparse":true})
db.documents.createIndex({"source.parentIds":1}, {"name":"sourceParentIds"})
db.documents.createIndex({"source.hierarchies":1}, {"name":"sourceHierarchies"})
db.documents.createIndex({"source.versionInfo.seriesId":1,"source.versionInfo.major":-1,"source.versionInfo.minor":-1}, {"name":"sourceVersionInfo"})
db.documents.createIndex({"source.versionInfo.isCurrent":1}, {"name":"sourceVersionInfoIsCurrent"})
db.documents.createIndex({"source.contentType.systemName":1}, {"name":"sourceContentTypeSystemName"})
db.documents.createIndex({"target.id":1}, {"name":"targetId","unique":true,"sparse":true})
db.documents.createIndex({"target.parentIds":1}, {"name":"targetParentIds"})
db.documents.createIndex({"target.hierarchies":1}, {"name":"targetHierarchies"})
db.documents.createIndex({"target.versionInfo.seriesId":1,"target.versionInfo.major":-1,"target.versionInfo.minor":-1}, {"name":"targetVersionInfo"})
db.documents.createIndex({"target.versionInfo.isCurrent":1}, {"name":"targetVersionInfoIsCurrent"})
db.documents.createIndex({"target.contentType.systemName":1}, {"name":"targetContentTypeSystemName"})