0
这里的数量是在Spring库类在弹簧数据的MongoDB,我不能指定限制值来限制结果
公共接口UserRepository扩展MongoRepository {
@Query(value = "{location :{ $nearSphere :{$geometry : {type : \"Point\", coordinates : [?1, ?0] }, $maxDistance :?2}}")
List<User> search(float latitude, float longitude, float radius, int limit);
}
我无法使用limit()函数来限制搜索功能返回的结果总数。我试着在@Query注释中的所有地方添加limit()。
谢谢你的帮助。 – 2014-10-28 15:26:58