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

Allow partial filter expression to use $_internalBucketGeoWithin

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • QO 2021-09-06
    • 0

      $_internalBucketGeoWithin (SERVER-57762) selects buckets that might contain events within a given region. That is:

      • It is guaranteed to return every bucket that does contain an event in the given region.
      • It may return other buckets, depending on the query plan.

      $geoWithin queries on events use $_internalBucketGeoWithin to narrow down the set of buckets (before unpacking and doing a more precise filter on events). As of SERVER-57763, partial indexes can use $geoWithin in partialFilterExpression. To make these features work together, we need to allow $_internalBucketGeoWithin in the partialFilterExpression.

      I think the rule for query containment is the same as a plain $geoWithin. If the index has regionA, and the query has regionB, then the index can be used only if regionB is contained in regionA.

            Assignee:
            maddie.zechar@mongodb.com Maddie Zechar
            Reporter:
            david.percy@mongodb.com David Percy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: