The SYS_INDEXES table lists the indexes of the collections as MongoDB has them, including the index of _id, and their options. Views have no indexes. It has the following columns:
Column Name |
Data Type |
Description |
|---|---|---|
| TABLE_CATALOG | VARCHAR | The name of the database of the connection. |
| TABLE_SCHEMA | VARCHAR | Not used in dotConnect for MongoDB. Always NULL. |
| TABLE_NAME | VARCHAR | The name of the collection which the index belongs to. |
| INDEX_NAME | VARCHAR | The name of the index. The index of _id is named _id_. |
| IS_PRIMARY | BOOLEAN | Indicates whether the index is the primary key. True for _id_ only. |
| IS_UNIQUE | BOOLEAN | Indicates whether the index is unique. True for _id_ and for an index created with the unique option. |
| IS_SPARSE | BOOLEAN | Indicates whether the index is sparse: it skips the documents that do not have the indexed field. |
| IS_PARTIAL | BOOLEAN | Indicates whether the index is partial: it covers only the documents that match its filter. |
| FILTER | VARCHAR | The filter of a partial index (partialFilterExpression) as JSON, for example {"email":{"$exists":true}}. NULL for other indexes. |
| EXPIRE_AFTER_SECONDS | BIGINT | The lifetime of the documents in seconds for a TTL index (expireAfterSeconds). NULL for other indexes. |
| DEFINITION | VARCHAR | The whole description of the index in MongoDB as JSON, for example {"v":2,"key":{"name":1},"name":"ix_name","unique":true}. |