solr-version:4.7.0

field spec as follows:
<fieldType name="location_rpt"
class="solr.SpatialRecursivePrefixTreeFieldType"       
spatialContextFactory="com.spatial4j.core.context.jts.JtsSpatialContextFactory"
validationRule="repairBuffer0" geo="true" distErrPct="0.025"
maxDistErr="0.000009" units="degrees" />

<field name="geom" type="location_rpt" indexed="true" stored="true"
multiValued="true"/> 

And i index some MULTILINESTRING (wkt formatted  shape, the road data), and
i query use "Intersects" spatial predicates like
fq=geom:"Intersects(POLYGON((-10 30, -40 40, -10 -20, 40 20, 0 0, -10 30)))
distErrPct=0".

In fact, i want to query the shape(multiline) which is intersect with the
query polygon, but the searched return document has nothing to do with the
query polygon(aka, isDisjointTo), then i test it use JTS api ,it indeed
return false, but solr think the line intersects with the polygon ,even
contains. is this a bug? or repair it in advanced version?

Geometry line = new WKTReader.read(the line  wkt text string);
Geometry polygon= new WKTReader.read(the polygon wkt text string);
line.intersects(polygon);//return false





--
View this message in context: 
http://lucene.472066.n3.nabble.com/why-MULTILINESTRING-can-contains-polygon-in-solr-spatial-search-tp4338593.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to