java - How to do Polygon Spatial Search in Spring-data-solr -
i have query below :-
fq=latlng:iswithin(polygon(('23.60 71.60','28.65 71.68','28.60 72.61','28.63 72.65')))
now got stuck here in how query using spring-data-solr have function like
public list<hotel> gethotelsinsidepolygon(point... points);
it helpful if tells how proceed
got 1 :-
thing change in solr polygon search work are
- add jts jars in deployed solr war web-inf/lib
- change field type of latlng "location" "location_rpt"
- modify location_rpt field type below
<fieldtype name="location_rpt" class="solr.spatialrecursiveprefixtreefieldtype" spatialcontextfactory="com.spatial4j.core.context.jts.jtsspatialcontextfactory" disterrpct="0.025" maxdisterr="0.000009" units="degrees" />
- add location data index , polygon query work.
Comments
Post a Comment