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

I believe there is a minor error in the ecosystem use-cases documentation

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 01112017-cleanup
    • None
    • manual
    • None

    Description

      See: https://docs.mongodb.org/ecosystem/use-cases/storing-comments/#hybrid-schema-design

          # Find this discussion's comment buckets
          buckets = db.comment_buckets.find(
              { 'discussion_id': discussion_id },
              { 'bucket': 1 })
          buckets = buckets.sort('bucket')
      

      I believe that the

      {'bucket': 1} 

      should not be included in the find, as this would only return a single bucket (which doesn't make sense to be sorted or iterated over as is done in the example).

      Attachments

        Activity

          People

            Unassigned Unassigned
            alexander.marquardt Alexander Marquardt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              7 years, 45 weeks, 6 days ago