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

Ability to ask for random samples

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Duplicate
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • Querying
    • None
    • Any

    Description

      It would be very nice to have the ability to ask mongoDB for a random sample for a given collection. I know this can be done via js but
      I might be much more efficient if this was built in especially for large collections.

      Something like

      blee.find(

      { $rand:1000 }

      ) => retrieves a random sample of size 1k

      Attachments

        Activity

          People

            eliot Eliot Horowitz (Inactive)
            derailed Fernand Galiana
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: