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

Create a way to add an empty sparse index, skipping iteration of the collection

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Indexing
    • Labels:
      None

      Description

      I'm currently adding some sparse indexes to big collections for which I'm certain the indexes matches no document.
      Creation of the index takes forever (because it iterates over every single document of the collections, blocking any operation meanwhile) while it could take just a few ms.

      Maybe something like {{

      { sparse: true,skipSparseIndexCreation: true }

      }}
      Also, this is probably trivial to do.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-query Backlog - Query Team
              Reporter:
              tubededentifrice Vincent
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: