Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-17858

Partial indexes should support more complex queries

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.1.5
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • Fully Compatible
    • Quint Iteration 3.1.2, Quint Iteration 3, Quint Iteration 4, Quint Iteration 5

      The 3.1.1 release of partial indexes supports only provides support for simple user queries. It should be possible for more complex user queries to be answered by a partial index.

      For example, an index with key pattern {a: 1} and partial index document filter {x: {$exists: true}} should be able to answer all of the following queries:

      find({a: 1, x: {$in: [1, 2]}})
      find({a: 1, $or: [{x: 1}, {x: 2}]})
      find({a: 1, x: /hello world/})
      find({a: 1, x: {$type: 1}})
      find({a: 1, x: {$geoWithin: ...}})
      find({a: 1, x: {$elemMatch: {y: 1, z: 1}}})
      

            Assignee:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Reporter:
            rassi J Rassi
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: