This polygon is fairly rectangular with one side having a ton of points.
Nonetheless the query point is clearly far apart from it (it's much lower
(smaller 'y' dimension).

On Wed, Jun 28, 2017 at 10:17 PM puneeta <pve...@accureanalytics.com> wrote:

> Hi David,
>   Actually my polygon had too many coordinates, so i just omitted some
> while
> posting my query. Here is my complete multipolygon where the last point is
> same as the first one:
>
> <add><doc>
>     <field name="geo">MULTIPOLYGON (((-86.477551331 32.4906056500001,
> -86.4776373509999 32.4903921820001, -86.478257247 32.4905655910001,
> -86.478250466 32.4905802390001, -86.478243988 32.490593680000096,
> -86.47823751 32.490607122, -86.478231749 32.490619100000096, -86.478224637
> 32.4906340650001, -86.478218237 32.4906475400001, -86.4782118479999
> 32.490661035000095, -86.4782054789999 32.4906745260001, -86.47820210799989
> 32.49068166600009, -86.478199132 32.4906880240001, -86.4781928259999
> 32.490701523, -86.478186533 32.490715047, -86.478183209 32.4907222090001,
> -86.47818027999989 32.4907285690001, -86.478174063 32.4907421250001,
> -86.478167851 32.4907556540001, -86.478162558 32.490767236000096,
> -86.47815905399989 32.490774513000105, -86.477551331 32.4906056500001)))
> </field>
> </doc></add>
>
> Thanks,
> Puneeta
>
>
>
>
> david.w.smi...@gmail.com wrote
> > I tried your data in the "JTS TestBuilder" GUI.  Firstly, your polygon
> > isn't "closed", but that was easily fixed by repeating the first point at
> > the end.  See the attached screenshot of the GUI for what these shapes
> > look like.  The red dot (the query point) is outside of this
> > triangular-ish shape, and thus not a match.
> >
> >
> >
> >
> >> On Jun 28, 2017, at 12:33 PM, puneeta &lt;
>
> > pverma@
>
> > &gt; wrote:
> >>
> >> Hi David,
> >>  I did the following changes:
> >>
> >> Changed in schema.xml:
> >>
> > <fieldType name="location_rpt"   class="solr.RptWithGeometrySpatialField"
> >>
> >
> >>
> spatialContextFactory="org.locationtech.spatial4j.context.jts.JtsSpatialContextFactory"
> >>               autoIndex="true"
> >>               validationRule="repairBuffer0"
> >>               distanceUnits="kilometers"
> >>                         useJtsMulti="false"
> >>                         />
> >>
> >>
> >> Added in solrconfig.xml:
> >>
> > <cache name="perSegSpatialFieldCache_geom"
> >>
> >            class="solr.LRUCache"
> >>           size="256"
> >>           initialSize="0"
> >>           autowarmCount="100%"
> >>           regenerator="solr.NoOpRegenerator"/>
> >>
> >> My fields in the core as defined in the schema is:
> >> &lt;
> http://lucene.472066.n3.nabble.com/file/n4343221/SolrGeoFieldDefinition.png&gt
> ;
> >>
> >> However, I still face the same issue. No results found for a
> multipolygon
> >> search.
> >>
> >> Not sure whats happening :(
> >>
> >> Puneeta
> >>
> >>
> >>
> >>
> >>
> >>
>
> > david.w.smiley@
>
> >  wrote
> >>>
> https://lucene.apache.org/solr/guide/6_6/spatial-search.html#SpatialSearch-RptWithGeometrySpatialField
> >>> &lt;
> https://lucene.apache.org/solr/guide/6_6/spatial-search.html#SpatialSearch-RptWithGeometrySpatialField&gt
> ;
> >>>
> >>>
> >>>> On Jun 28, 2017, at 11:32 AM, puneeta &lt;
> >>
> >>> pverma@
> >>
> >>> &gt; wrote:
> >>>>
> >>>> Hi David,
> >>>> I am sorry ,I did not understand what do you mean by "I suggest using
> >>>> RptWithGeometry field". Should leave the existing location_rpt
> >>>> definition
> >>>> in
> >>>> schema.xml?
> >>>>
> >>>
> > <fieldType name="location_rpt"
> >>
> >>>
> >>> class="solr.SpatialRecursivePrefixTreeFieldType"
> >>>>              geo="true" distErrPct="0.025" maxDistErr="0.001"
> >>>> distanceUnits="kilometers" />
> >>>> This line I have commented. Should I uncomment it?
> >>>>
> >>>> 1."remove distErrPct and maxDistErr" -
> >>>> 2.Added usejtsMulti="false"
> >>>>
> >>>> I will change the  field definition as follows, try to execute and
> >>>> report
> >>>> back.
> >>>>
> >>>
> > <fieldType name="location_rpt"
> >>
> >>>
> >>>           class="solr.SpatialRecursivePrefixTreeFieldType"
> >>>>
> >>>>
> >> *
> >>> jts*="org.locationtech.spatial4j.context.jts.JtsSpatialContextFactory"
> >>>>               autoIndex="true"
> >>>>               validationRule="repairBuffer0"
> >>>>               distanceUnits="kilometers"
> >>>>               *useJtsMulti="false"*/>
> >>>>
> >>>>
> >>>> The issue I am facing is that the I am not getting the search result
> >>>> for
> >>>> Multipolygon i.e I should get hits.Currently, the numFound = 0, It
> >>>> should
> >>>> find atleast 1 record as it does for a Polygon search.
> >>>>
> >>>> Thanks,
> >>>> Puneeta
> >>>>
> >>>>
> >>
> >>> david.w.smiley@
> >>
> >>> &lt;mailto:
> >>
> >>> david.w.smiley@
> >>
> >>> &gt; wrote
> >>>>> I suggest using RptWithGeometry field, and with that change remove
> >>>>> distErrPct and maxDistErr.  See the ref guide, and note the geometry
> >>>>> cache
> >>>>> option.
> >>>>> BTW spatialContextFactory can simply be "jts".
> >>>>>
> >>>>> If this fixes the issue, then the issue was related to grid
> >>>>> approximation.
> >>>>>
> >>>>> BTW you never quite said what it was about the results that was
> wrong.
> >>>>> Did you get hits you didn't expect (I'm guessing yes) or the inverse?
> >>>>>
> >>>>> ~ David
> >>>>>
> >>>>>> On Jun 28, 2017, at 10:55 AM, puneeta &lt;
> >>>>
> >>>>> pverma@
> >>>>
> >>>>> &gt; wrote:
> >>>>>>
> >>>>>> Hi David,
> >>>>>> Thank you for the prompt reply. My field definition in schema.xml is
> >>>>>> :
> >>>>>>
> >>>>>> I commented the existing location_rpt
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> And added:
> >>>>>>
> >>>>>
> >>>
> > <fieldType name="location_rpt"
> >>
> >>>
> >>>>>
> >>>>> class="solr.SpatialRecursivePrefixTreeFieldType"
> >>>>>>
> >>>>>>
> spatialContextFactory="org.locationtech.spatial4j.context.jts.JtsSpatialContextFactory"
> >>>>>>             autoIndex="true"
> >>>>>>             validationRule="repairBuffer0"
> >>>>>>             distErrPct="0.025"
> >>>>>>             maxDistErr="0.001"
> >>>>>>             distanceUnits="kilometers" />
> >>>>>>
> >>>>>> My Solr version is 6.2.1
> >>>>>>
> >>>>>> Thanks,
> >>>>>> Puneeta
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> --
> >>>>>> View this message in context:
> >>>>>>
> http://lucene.472066.n3.nabble.com/Polygon-search-query-working-but-NOT-Multipolygon-tp4343143p4343162.html
> >>>>>> Sent from the Solr - User mailing list archive at Nabble.com.
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> View this message in context:
> >>>>
> http://lucene.472066.n3.nabble.com/Polygon-search-query-working-but-NOT-Multipolygon-tp4343143p4343184.html
> >>>> &lt;
> http://lucene.472066.n3.nabble.com/Polygon-search-query-working-but-NOT-Multipolygon-tp4343143p4343184.html&gt
> ;
> >>>> Sent from the Solr - User mailing list archive at Nabble.com
> >>>> &lt;http://nabble.com/&gt;.
> >>
> >>
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://lucene.472066.n3.nabble.com/Polygon-search-query-working-but-NOT-Multipolygon-tp4343143p4343221.html
> >> Sent from the Solr - User mailing list archive at Nabble.com.
> >
> >
> >
> > PastedGraphic-1.png (202K)
> > &lt;
> http://lucene.472066.n3.nabble.com/attachment/4343241/0/PastedGraphic-1.png&gt
> ;
>
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Polygon-search-query-working-but-NOT-Multipolygon-tp4343143p4343342.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
-- 
Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
http://www.solrenterprisesearchserver.com

Reply via email to