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

Comment on: "manual/tutorial/sort-results-with-indexes.txt"

    XMLWordPrintableJSON

Details

    Description

      In the section of "Sort and Non-prefix Subset of an Index", the example "db.data.find(

      { b: 3, a: 4 }

      ).sort(

      { c: 1 }

      )" applies the index "

      { a: 1, b: 1, c: 1 }

      ".

      Doesn't order of index make sense in "equity" query in MongoDB? In my understanding, the correct query should be "db.data.find(

      { a: 4, b: 3 }

      ).sort(

      { c: 1 }

      )".

      Attachments

        Activity

          People

            kay.kim@mongodb.com Kay Kim (Inactive)
            xgen-internal-docs Docs Collector User (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              8 years, 17 weeks, 1 day ago