Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-3228

Inconsistency between index name limit documentation

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • v1.3.6
    • None
    • manual
    • None

    Description

      From http://docs.mongodb.org/manual/reference/method/db.collection.ensureIndex/:

      Index names, including their full namespace (i.e. database.collection) cannot be longer than 128 characters. See the getIndexes() field name for the names of existing indexes.

      Contrast this with http://docs.mongodb.org/manual/reference/limits/#Index-Name-Length:

      The names of indexes, including their namespace (i.e database and collection name), cannot be longer than 125 characters. The default index name is the concatenation of the field names and index directions.

      I believe the latter example is omitting the "." that would appear between the database/collection and the ".$" collection/index tokens.

      Either way, we should probably discuss this limit consistently everywhere, whether that means listing the total limit or deducting the periods and explaining their presence.

      Attachments

        Activity

          People

            tim.slavin Tim Slavin
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              9 years, 37 weeks, 5 days ago