Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rewrite of near & nearSphere count queries using geoJson to geoWithin. #4006

Closed
wants to merge 4 commits into from

Commits on Mar 23, 2022

  1. Prepare issue branch.

    christophstrobl committed Mar 23, 2022
    Configuration menu
    Copy the full SHA
    5e48f40 View commit details
    Browse the repository at this point in the history
  2. Fix rewrite near & nearSphere count queries using geoJson to geoWithin.

    $near and $nearSphere queries are not supported via countDocuments and the used aggregation match stage and need to be rewritten to $geoWithin. The existing logic did not cover usage of geoJson types, which is fixed now. In case of nearSphere it is also required to convert the $maxDistance argument (given in meters for geoJson) to radians which is used by $geoWithin $centerSphere.
    
    Related to #2925
    christophstrobl committed Mar 23, 2022
    Configuration menu
    Copy the full SHA
    d950c53 View commit details
    Browse the repository at this point in the history
  3. Polishing

    Update Javadoc to mention unit of measure for min/maxDistance depending on usage of geoJson.
    Also remove unused imports from tests
    christophstrobl committed Mar 23, 2022
    Configuration menu
    Copy the full SHA
    17efe1d View commit details
    Browse the repository at this point in the history

Commits on Mar 24, 2022

  1. Configuration menu
    Copy the full SHA
    cd7ec27 View commit details
    Browse the repository at this point in the history