[jira] [Commented] (SOLR-12855) Add distanceUnits-and-WKT-strings hint to exception thrown by AbstractSpatialFieldType.parseShape()

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (SOLR-12855) Add distanceUnits-and-WKT-strings hint to exception thrown by AbstractSpatialFieldType.parseShape()

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/SOLR-12855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16646824#comment-16646824 ]

Christine Poerschke commented on SOLR-12855:
--------------------------------------------

Attached proposed patch. Here's an illustration of what the exception wording would look like then.
{code}
... o.a.s.h.RequestHandlerBase org.apache.solr.common.SolrException: ERROR: [doc=23_-90_180] Error adding field 'pos_srpt'='-90 180' msg=Unable to parse shape given formats "lat,lon", "x y" or as WKT because java.text.ParseException: Unknown Shape definition [-90 180]
(note: distanceUnits=kilometers doesn’t affect distances embedded in WKT strings which are still in degrees)
        at org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:215)
        at org.apache.solr.update.AddUpdateCommand.getLuceneDocument(AddUpdateCommand.java:102)
        at org.apache.solr.update.DirectUpdateHandler2.updateDocOrDocValues(DirectUpdateHandler2.java:962)
...
{code}

> Add distanceUnits-and-WKT-strings hint to exception thrown by AbstractSpatialFieldType.parseShape()
> ---------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-12855
>                 URL: https://issues.apache.org/jira/browse/SOLR-12855
>             Project: Solr
>          Issue Type: Task
>            Reporter: Christine Poerschke
>            Priority: Minor
>         Attachments: SOLR-12855.patch
>
>
> The [Schema Configuration for RPT|http://lucene.apache.org/solr/guide/7_5/spatial-search.html#schema-configuration-for-rpt] section of the Solr Reference Guide mentions "However, it doesn’t affect distances embedded in WKT strings ... which are still in degrees." for the {{distanceUnits}} attribute.
> This ticket proposes to include something along those lines as part of the {{"Unable to parse shape given formats ..."}} exception that is thrown if the user perhaps did not see or remember about the 'however' mention for the attribute.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]