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