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

  1. add jts jars in deployed solr war web-inf/lib
  2. change field type of latlng "location" "location_rpt"
  3. 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" />

  1. add location data index , polygon query work.

Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -