dotConnect for MongoDB Documentation
On this page
    SYS_INDEX_COLUMNS
    On this page

    The SYS_INDEX_COLUMNS table lists the fields of each index in key order: a compound index has a row for each field. 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.
    COLUMN_NAME VARCHAR The name of the indexed field; a field of an embedded document has a dotted name (address.city). A text index lists the fields MongoDB keeps in its key, _fts and _ftsx.
    ORDINAL_POSITION INT The position of the field in the index key, starting from 1.
    IS_DESCENDING BOOLEAN Indicates whether the field is indexed in descending order (-1 in the index key).
    KEY_TYPE VARCHAR The value of the field in the index key: "1" (ascending), "-1" (descending), "text", "hashed", "2dsphere" or "2d".

    For example, the index {"address.city": 1, "name": -1} named ix_city_name gives two rows: address.city with ORDINAL_POSITION 1, IS_DESCENDING False and KEY_TYPE "1", and name with ORDINAL_POSITION 2, IS_DESCENDING True and KEY_TYPE "-1".