Meaning of "Point must only contain numeric elements" with $near queries

Hi,

I am using a spring boot application and making $near queries using the @Query annotation. My queries work fine in my application until I pass a Pageable with size smaller than 2 or with a page number greater than 1.

The explanation I provided is very broad and I apologies in advance. I spent hours attempting to figure things out but I still don’t exactly know what this error even means given that my queries using $near work.

Thanks a lot!

Update: The database I am working with has 3 documents with properly formed geojson points. Also,
the pageable does not seem to allow size below the results count.

(I don’t know how to edit msg) I narrowed down the issue to this:

Pageable does not work properly when passing a Pageable type to the method annotated with @Query when it is returning a Page<?> type.

When the method returns a something else like List<?>, the Pageable works as expected.

Still not sure why the Page<?> produces errors though.