File tree 2 files changed +10
-7
lines changed
main/java/org/springframework/data/mongodb/core/query
test/java/org/springframework/data/mongodb/core
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) {
624
624
}
625
625
626
626
/**
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.
628
632
*
629
- * @param maxDistance
633
+ * @param maxDistance radians or meters
630
634
* @return this.
631
635
* @see <a href="https://docs.mongodb.com/manual/reference/operator/query/maxDistance/">MongoDB Query operator:
632
636
* $maxDistance</a>
@@ -645,8 +649,11 @@ public Criteria maxDistance(double maxDistance) {
645
649
/**
646
650
* Creates a geospatial criterion using a {@literal $minDistance} operation, for use with {@literal $near} or
647
651
* {@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.
648
655
*
649
- * @param minDistance
656
+ * @param minDistance radians or meters
650
657
* @return this.
651
658
* @since 1.7
652
659
*/
Original file line number Diff line number Diff line change 15
15
*/
16
16
package org .springframework .data .mongodb .core ;
17
17
18
- import static org .mockito .Mockito .*;
19
18
import static org .springframework .data .mongodb .core .query .Criteria .*;
20
19
import static org .springframework .data .mongodb .core .query .Query .*;
21
20
import static org .springframework .data .mongodb .test .util .Assertions .*;
22
21
23
22
import org .junit .jupiter .api .BeforeEach ;
24
23
import org .junit .jupiter .api .Test ;
25
-
26
24
import org .springframework .data .geo .Point ;
27
- import org .springframework .data .mongodb .MongoDatabaseFactory ;
28
- import org .springframework .data .mongodb .core .convert .DefaultDbRefResolver ;
29
25
import org .springframework .data .mongodb .core .convert .MappingMongoConverter ;
30
26
import org .springframework .data .mongodb .core .convert .NoOpDbRefResolver ;
31
27
import org .springframework .data .mongodb .core .convert .QueryMapper ;
You can’t perform that action at this time.
0 commit comments