I asked the same question on stackoverflow without much luck.
In my repository I have this method:
If I pass to it a Distance with Metrics.Kilometers, the GeoResults in the GeoPage have the distance with Metric.Neutral. Is this the correct behavior or am I missing something? I can get the correct value moltiplying the distance value by 6378.137, but still, I'm confused on how this should work.
GeoPage<MyType> findByLocNear(Point location, Distance distance, Pageable pageable);
GeoPage<MyObject> results = myObjectRepository.findByLocNear(new Point(9.1916, 45.464), new Distance(500, Metrics.KILOMETERS),new PageRequest(0, 10));
java.lang.AssertionError: expected:<KILOMETERS> but was:<NEUTRAL>