Hi Puneeta,

So what does your field type definition look like?  I'd imagine you're using 
RptWithGeometrySpatialField.  And what is your Solr version?

BTW note the settings here 
https://locationtech.github.io/spatial4j/apidocs/org/locationtech/spatial4j/context/jts/JtsSpatialContextFactory.html
 
<https://locationtech.github.io/spatial4j/apidocs/org/locationtech/spatial4j/context/jts/JtsSpatialContextFactory.html>
  are reflected as attributes on the field type, thus you can set say 
useJtsMulti="false" to change the 'multi implementation.

~ David

> On Jun 28, 2017, at 6:44 AM, puneeta <pve...@accureanalytics.com> wrote:
> 
> Hi,
> I am new to Solr Geospatial data and have set up JTS within solr. I have
> geo spatial data with Multipolygons. I am passing the coordinates and trying
> to find out which multipolygon contains those coordinates.However, The
> search query is working fine if I insert the data as a polygon. The same is
> not working if my data is inserted as a Multipolygon. I am unable to figure
> out what am I missing. Can anyone suggest where am I going wrong?
> 
> Data as Polygon:
> {     "parcel_id":"6",
>        "geo":["POLYGON((-86.452970463 32.449739005, 
>                                  -86.452889912 32.4494390510001, 
>                                  -86.453365379 32.449428021000095, 
>                                  -86.453514854 32.449424535999995))"]
> }
> 
> Data as Multipolygon:
> 
> {     "parcel_id":"6",
>        "geo":["MULTIPOLYGON(((-86.452970463 32.449739005, 
>                                  -86.452889912 32.4494390510001, 
>                                  -86.453365379 32.449428021000095, 
>                                  -86.453514854 32.449424535999995)))"]
> }
> 
> My search query:
> fq=geo:"Intersects(-86.4530978929999 32.449735102)"
> 
> This device surely lies between the polygon (My polygon coordinates are many
> more in the actual data. To reduce the size here I have omited few of the
> coordinates)
> 
> The query is returning only the polygon data. The multipolygon search is not
> happening.
> 
> Any help is highly appreciated.
> 
> Thanks in Advance,
> Puneeta
> 
> 
> 
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Polygon-search-query-working-but-NOT-Multipolygon-tp4343143.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to