Here is my query

@Query(value = "{ 'status' : 'A', 'locPt' : { $nearSphere : { $geometry: {type : 'Point', coordinates : [ ?0, ?1 ] }, $maxDistance : ?2 } }, '$or':[ { $where: '?4 == 0' } , {'valRealEstate' : { '$gt' : ?4}} ] }" public Page cstmSearchBsns(double longitude, double latitude, int dist, int mRent, int valRe ,Pageable pg1);

This fails with error: Point must only contain numeric elements

If I change return type from public Page to public List it works fine

$where and $nearSphere both cause problem. If I only use status:'A' it works fine.

So returning a page has some bug in it if either $where or $nearSphere or both are used

mongo:4.4.6

spring-boot-starter-parent 2.3.11.RELEASE

Comment From: snicoll

@marc1091 if you believe you've found a bug, this is the wrong place to ask. Spring Data MongoDB has a dedicated issue tracker. It is not clear to me what bug that would be. If you're trying to get support, please ask first a question on StackOverflow, as mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements.

Comment From: marc1091

Yes I did post it in the wrong board and can not find anyway to delete it. Sorry about that. Others who might stumble upon this page, can read https://stackoverflow.com/questions/24004015/spring-data-mongodb-nearsphere-not-working-with-query-withpageable