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

/**
* 离我最近的商家筛选
*/
/**
* 当前经纬度 lat lon
*/
if(null == queryVO.getDistanceKm()) {
boolQueryBuilder.must(QueryBuilders.geoDistanceQuery("location").
distance(queryVO.getDistanceKm(), DistanceUnit.KILOMETERS).
point(new GeoPoint(lat, lon)));
}
原文地址:https://www.cnblogs.com/pzyin/p/13674869.html