[英]How to return distance and score in spatial search using spring-data-solr
[英]How to do Polygon Spatial Search in Spring-data-solr
我必須做一個類似下面的查詢:
fq=latlng:IsWithin(POLYGON(('23.60 71.60','28.65 71.68','28.60 72.61','28.63 72.65')))
現在我被困在如何使用Spring-Data-Solr進行此查詢的功能中
public List<Hotel> getHotelsInsidePolygon(Point... points);
如果有人告訴我如何進行將很有幫助
有這個:-
為了多邊形搜索工作而在Solr中更改的東西是
<fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType" spatialContextFactory="com.spatial4j.core.context.jts.JtsSpatialContextFactory" distErrPct="0.025" maxDistErr="0.000009" units="degrees" />
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.