Allow partial filter expression to use $_internalBucketGeoWithin

XMLWordPrintableJSON

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

      $_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
            Reporter:
            David Percy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: