File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
main/java/org/springframework/data/mongodb/core/query
test/java/org/springframework/data/mongodb/core Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -624,9 +624,13 @@ public Criteria intersects(GeoJson geoJson) {
624624 }
625625
626626 /**
627- * Creates a geo-spatial criterion using a {@literal $maxDistance} operation, for use with $near
627+ * Creates a geo-spatial criterion using a {@literal $maxDistance} operation, for use with {@literal $near} or
628+ * {@literal $nearSphere}.
629+ * <p>
630+ * <strong>NOTE:</strong> The unit of measure for distance may depends on the used coordinate representation
631+ * (legacy vs. geoJson) as well as the target operation.
628632 *
629- * @param maxDistance
633+ * @param maxDistance radians or meters
630634 * @return this.
631635 * @see <a href="https://docs.mongodb.com/manual/reference/operator/query/maxDistance/">MongoDB Query operator:
632636 * $maxDistance</a>
@@ -645,8 +649,11 @@ public Criteria maxDistance(double maxDistance) {
645649 /**
646650 * Creates a geospatial criterion using a {@literal $minDistance} operation, for use with {@literal $near} or
647651 * {@literal $nearSphere}.
652+ * <p>
653+ * <strong>NOTE:</strong> The unit of measure for distance may depends on the used coordinate representation
654+ * (legacy vs. geoJson) as well as the target operation.
648655 *
649- * @param minDistance
656+ * @param minDistance radians or meters
650657 * @return this.
651658 * @since 1.7
652659 */
Original file line number Diff line number Diff line change 1515 */
1616package org .springframework .data .mongodb .core ;
1717
18- import static org .mockito .Mockito .*;
1918import static org .springframework .data .mongodb .core .query .Criteria .*;
2019import static org .springframework .data .mongodb .core .query .Query .*;
2120import static org .springframework .data .mongodb .test .util .Assertions .*;
2221
2322import org .junit .jupiter .api .BeforeEach ;
2423import org .junit .jupiter .api .Test ;
25-
2624import org .springframework .data .geo .Point ;
27- import org .springframework .data .mongodb .MongoDatabaseFactory ;
28- import org .springframework .data .mongodb .core .convert .DefaultDbRefResolver ;
2925import org .springframework .data .mongodb .core .convert .MappingMongoConverter ;
3026import org .springframework .data .mongodb .core .convert .NoOpDbRefResolver ;
3127import org .springframework .data .mongodb .core .convert .QueryMapper ;
You can’t perform that action at this time.
0 commit comments