1分钟快速查询 离我最近商家,Java es

/**
* 离我最近的商家筛选
*/
/**
* 当前经纬度 lat lon
*/
if(null == queryVO.getDistanceKm()) {
boolQueryBuilder.must(QueryBuilders.geoDistanceQuery("location").
distance(queryVO.getDistanceKm(), DistanceUnit.KILOMETERS).
point(new GeoPoint(lat, lon)));
}
posted @ 2020-09-15 19:11  哦克Oak  阅读(594)  评论(0编辑  收藏  举报