In version of 2.5.x,I use @GeoSpatialIndexed in entity,but it doesn't work and it throws exception "geonear needs 2d or 2dsphere",and I have to use low version like 2.2.5, and it works.So I hope to solve it,and thank you!

Comment From: wilkinsona

@GeoSpatialIndexed is part of Spring Data MongoDB which is managed as a separate project. If you believe that you have found a bug, please open a Spring Data MongoDB issue. If you do so, please take the time to describe the problem in more detail and, ideally, to provide a complete and minimal sample that reproduces the problem.