Polishing
Update Javadoc to mention unit of measure for min/maxDistance depending on usage of geoJson. Also remove unused imports from tests See #4004 Original pull request: #4006.
This commit is contained in:
committed by
Mark Paluch
parent
ee712f67db
commit
b5c40e7427
@@ -624,9 +624,13 @@ public class Criteria implements CriteriaDefinition {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a geo-spatial criterion using a {@literal $maxDistance} operation, for use with $near
|
||||
* Creates a geo-spatial criterion using a {@literal $maxDistance} operation, for use with {@literal $near} or
|
||||
* {@literal $nearSphere}.
|
||||
* <p>
|
||||
* <strong>NOTE:</strong> The unit of measure for distance may depends on the used coordinate representation
|
||||
* (legacy vs. geoJson) as well as the target operation.
|
||||
*
|
||||
* @param maxDistance
|
||||
* @param maxDistance radians or meters
|
||||
* @return this.
|
||||
* @see <a href="https://docs.mongodb.com/manual/reference/operator/query/maxDistance/">MongoDB Query operator:
|
||||
* $maxDistance</a>
|
||||
@@ -645,8 +649,11 @@ public class Criteria implements CriteriaDefinition {
|
||||
/**
|
||||
* Creates a geospatial criterion using a {@literal $minDistance} operation, for use with {@literal $near} or
|
||||
* {@literal $nearSphere}.
|
||||
* <p>
|
||||
* <strong>NOTE:</strong> The unit of measure for distance may depends on the used coordinate representation
|
||||
* (legacy vs. geoJson) as well as the target operation.
|
||||
*
|
||||
* @param minDistance
|
||||
* @param minDistance radians or meters
|
||||
* @return this.
|
||||
* @since 1.7
|
||||
*/
|
||||
|
||||
@@ -15,17 +15,13 @@
|
||||
*/
|
||||
package org.springframework.data.mongodb.core;
|
||||
|
||||
import static org.mockito.Mockito.*;
|
||||
import static org.springframework.data.mongodb.core.query.Criteria.*;
|
||||
import static org.springframework.data.mongodb.core.query.Query.*;
|
||||
import static org.springframework.data.mongodb.test.util.Assertions.*;
|
||||
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.data.geo.Point;
|
||||
import org.springframework.data.mongodb.MongoDatabaseFactory;
|
||||
import org.springframework.data.mongodb.core.convert.DefaultDbRefResolver;
|
||||
import org.springframework.data.mongodb.core.convert.MappingMongoConverter;
|
||||
import org.springframework.data.mongodb.core.convert.NoOpDbRefResolver;
|
||||
import org.springframework.data.mongodb.core.convert.QueryMapper;
|
||||
|
||||
Reference in New Issue
Block a user