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

Mention alternative ways of finding arrays with a minimum/maximum size

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Minor - P4 Minor - P4
    • Server_Docs_20231030
    • None
    • manual
    • None

    Description

      ----------------------------

      Original Description

      https://docs.mongodb.com/manual/reference/operator/query/size/ reads

      $size does not accept ranges of values. To select documents based on fields with different numbers of elements, create a counter field that you increment when you add elements to a field.

      That is no longer the best method since v2.2, and several other methods have been mentioned at https://stackoverflow.com/questions/7811163/query-for-documents-where-array-size-is-greater-than-1
      ----------------------------

      Description

      Scope of changes (files that need work and how much)

      Impact to other docs outside of this product

      MVP (work and date?)

      Resources (e.g. Scope Docs, Invision)

      Attachments

        Activity

          People

            Unassigned Unassigned
            dandv Dan Dascalescu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              1 year, 14 weeks, 2 days ago