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

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

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0.0-rc0, 3.2.21, 3.6.6, 3.4.16
    • Affects Version/s: None
    • Component/s: None
    • None

      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.

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

              Created:
              Updated:
              Resolved:
              5 years, 46 weeks ago