Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-2366

Speed up creation of (don't populate) index on unused field for sparse index

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Indexing
    • Labels:
      None
    • Case:

      Description

      This would help when schemas change and a user needs to start using another field within a collection. The user would create an index on the new field, and instead of uselessly having to scan through every document, index creation would happen immediately.

      If collections kept track of which fields were in use, index creation for an unused could just be empty instead of having to check every document.

      Even if collections don't keep track of exact fields, they can use a bloom filter to approximately keep track.

      Finally, there should be an option to ensureIndex() that instantaneously creates an empty index instead of scanning through every document when the user is confident the collection does not contain documents that contain the field. The option can be

      {empty:true}

      or

      {populate:false}

      .

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-query Backlog - Query Team (Inactive)
              Reporter:
              dlee David Lee
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: