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

Docs for SERVER-34851: Disallow index selection for identical min & max values on find

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.0.0-rc0, 3.2.21, 3.6.6, 3.4.16
    • None
    • None
    • None

    Description

      Description:

      Prior to this patch a query could be run with $min and $max values that were identical. As $min is inclusive and $max is exclusive, this would always result in an empty range. May be worth documenting that $max must always be greater than $min.

      Scope of changes:

      • meta/min
      • meta/max
      • cursor/min
      • cursor max
      • 4.0-compatibility

      (for backports – just do pull request for releases not out yet)

      Impact to other docs outside of this product:

      none

      MVP:

      Resources:

      Engineering Ticket Description:

      As the max value is an exclusive bound, setting min and max to the same value will match nothing, even when an index exists that supports the key provided.

      Attachments

        Activity

          People

            kay.kim@mongodb.com Kay Kim (Inactive)
            kay.kim@mongodb.com Kay Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              5 years, 22 weeks, 5 days ago