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

Clarify why order of sort() and limit() don't affect order of find() results

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • Server_Docs_20231030
    • None
    • manual, Server

    Description

      Hello Sir/Madam,

      It's not clear if the limit returns the first documents and based on which order they are returned.

      Also the order of combining command:
      find().sort().limit
      and
      find().limit().sort()
      is not clear why is equivalent! I expect for the fist line to sort then to return the fist "n" documents while the second command I expect to return the "n" documents then to sort them

      It will be helpful it you add more explanation here.

      Best regards,
      Naseem

      Attachments

        Activity

          People

            Unassigned Unassigned
            xgen-internal-docs Docs Collector User (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              1 year, 14 weeks, 1 day ago