spring-data-mongo repository geoIntersects

时间:2018-05-11 02:25:26

标签: java mongodb spring-data-mongodb

我正在尝试创建一个基于PagingAndSortingRepository的存储库,包括一个查找哪个邻域包含位置的方法,我想的是:

List<Neighbourhood> findByLocationIntersects(Point point);

邻居包括财产:

private GeoJsonPolygon location;

就mongo查询而言,它将类似于:

db.neighbourhoods.find({ location: { $geoIntersects: { $geometry: { type: "Point", coordinates: [ -34.610268, -58.363397 ] } } } })

不幸的是,这是失败的,我在丢失一些东西,或者这还没有在spring-data-mongodb中实现?

0 个答案:

没有答案
相关问题