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
DATAMONGO-1127 - Add support for geoNear queries with distance information. #261
Conversation
8eb0af1
to
517c216
Compare
…ation. We now support geoNear queries in Aggregations. Exposed GeoNearOperation factory method in Aggregation. Introduced new distanceField property to NearQuery since it is required for geoNear queries in Aggregations. Original pull request: #261.
517c216
to
bc27ca6
Compare
…ation. We now support geoNear queries in Aggregations. Exposed GeoNearOperation factory method in Aggregation. Introduced new distanceField property to NearQuery since it is required for geoNear queries in Aggregations. Original pull request: #261.
bc27ca6
to
505d15b
Compare
…ation. We now support geoNear queries in Aggregations. Exposed GeoNearOperation factory method in Aggregation. Introduced new distanceField property to NearQuery since it is required for geoNear queries in Aggregations. Original pull request: #261.
I don't quite like the addition of |
…ation. Prepare issue branch.
…ation. We now support geoNear queries in Aggregations. Exposed GeoNearOperation factory method in Aggregation. Introduced new distanceField property to NearQuery since it is required for geoNear queries in Aggregations. Original pull request: #261.
505d15b
to
ba9797d
Compare
…ation. We now support geoNear queries in Aggregations. Exposed GeoNearOperation factory method in Aggregation. Original pull request: #261.
…ation. We now support geoNear queries in Aggregations. Exposed GeoNearOperation factory method in Aggregation. Original pull request: #261.
ba9797d
to
00d3da7
Compare
* @return | ||
* @since 1.7 | ||
*/ | ||
public static GeoNearOperation geoNear(NearQuery query, String distanceField) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we actually add an overload without the distance field applied so that basically people can mimic what they got when using new GeoNearOperation(nearQuery)
before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the geoNear(...) method was not exposed before this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that. Still, we need to keep the constructor in GeoNearOperations
which then raises the question why geoNear(query, distance)
is available as factory method but geoNear(query)
is not. We should stay symmetric here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack.
…ation. Revised the code according to code review. Note that the $geoNear Operation within an Aggregation requires a distanceField to be configured, therefore we make sure that it is set accordingly. Added hints to use the static factory methods of Aggregation to the javadoc of the AggreationOperation classes.
…ation. We now support geoNear queries in Aggregations. Exposed GeoNearOperation factory method in Aggregation. Introduced new distanceField property to NearQuery since it is required for geoNear queries in Aggregations. Original pull request: #261.
…ation. We now support geoNear queries in Aggregations. Exposed GeoNearOperation factory method in Aggregation. Introduced new distanceField property to NearQuery since it is required for geoNear queries in Aggregations. Original pull request: #261.
We now support geoNear queries in Aggregations. Exposed GeoNearOperation factory method in Aggregation. Introduced new distanceField property to NearQuery since it is required for geoNear queries in Aggregations.