No, but I want to say that's so weird.  I think it's ultimately a JTS issue
and maaaaybe a Spatial4j issue and not a Solr issue.  You might try the
latest JTS.  You could work around the problem by basically doing a
disjunction (OR) across multiple spatial query clauses, all in one FQ.
Something like this (off the top of my head; didn't verify):   fq= $fq.p1
$fq.p2 &fq.p1={!.....}&fq.p2={!.....}
Note the leading space after fq= here is important for obscure reasons.

~ David Smiley

On Thu, Oct 24, 2024 at 4:12 AM Carlo Ascani <ca...@doloops.net> wrote:

> Hi all,
>
> I am getting:
>
> {
>   "responseHeader": {
>     "status": 400,
>     "QTime": 62,
>     "params": {
>       "q": "*:*",
>       "fq": "{!field f=geo_rpt
> v='Intersects(MULTIPOLYGON(((13.272047419856218
> 48.20342387325925,13.370237727473405
> 48.244137723977545,13.44302215130153
> 48.17504227627839,13.383970637629655
> 48.150768126725936,13.33865203411403
> 48.116856700661884,13.34139861614528
> 48.08842718090738,13.24801482708278
> 48.03289847303553,13.119912454984624
> 48.053979156872046,13.16347145983963
> 48.1264096711872,13.18060214893161 48.1543310774741,13.21356113330661
> 48.20011856948039,13.272047419856218
> 48.20342387325925)),((13.425127918007046
> 48.24513412358048,13.491045886757046
> 48.249706600761854,13.548724109413296
> 48.22272307592147,13.535677844764859
> 48.18931698246186,13.504092151405484
> 48.18611251356045,13.462893420936734
> 48.202132854489335,13.425814563514859
> 48.21906319722122,13.392855579139859
> 48.24239044104389,13.396288806678921
> 48.27393390506279,13.437487537147671
> 48.26982064390009,13.437487537147671
> 48.270277689268816,13.425127918007046 48.24513412358048))))'}"
>     }
>   },
>   "error": {
>     "metadata": [
>       "error-class",
>       "org.apache.solr.common.SolrException",
>       "root-error-class",
>       "org.locationtech.jts.geom.TopologyException"
>     ],
>     "msg": "Unable to parse shape given formats \"lat,lon\", \"x y\"
> or as WKT because java.text.ParseException:
> org.locationtech.jts.geom.TopologyException: side location conflict:
> arg 1 [ (13.437273381247506, 48.269842025120745, NaN) ] input:
> MULTIPOLYGON(((13.272047419856218 48.20342387325925,13.370237727473405
> 48.244137723977545,13.44302215130153
> 48.17504227627839,13.383970637629655
> 48.150768126725936,13.33865203411403
> 48.116856700661884,13.34139861614528
> 48.08842718090738,13.24801482708278
> 48.03289847303553,13.119912454984624
> 48.053979156872046,13.16347145983963
> 48.1264096711872,13.18060214893161 48.1543310774741,13.21356113330661
> 48.20011856948039,13.272047419856218
> 48.20342387325925)),((13.425127918007046
> 48.24513412358048,13.491045886757046
> 48.249706600761854,13.548724109413296
> 48.22272307592147,13.535677844764859
> 48.18931698246186,13.504092151405484
> 48.18611251356045,13.462893420936734
> 48.202132854489335,13.425814563514859
> 48.21906319722122,13.392855579139859
> 48.24239044104389,13.396288806678921
> 48.27393390506279,13.437487537147671
> 48.26982064390009,13.437487537147671
> 48.270277689268816,13.425127918007046 48.24513412358048)))",
>     "code": 400
>   }
> }
>
>
> The input geometry looks valid, meaning I can correctly plot that WKT
> onto a map and in every online tool I have found.
>
> Also, the WKT is a multipolygon with 2 polygons, if I run the same
> query intersecting both the polygons singularly, it works fine.
>
> Other multipolygons works fine as well.
>
>
> Any idea where the error could be?
>
> Cheers,
>
> Carlo
>

Reply via email to