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

David Smiley commented on SOLR-6797:
------------------------------------

If 'units' were named 'distanceUnits' then perhaps, but as-is, 'units' is 
ambiguous.  Units of what?  It was units of the coordinate values, which 
actually remains degrees.  My proposal is that score=degrees|kilometers 
_implies_ distance as the score, plus it allows the application to state the 
preference in their code & URL parameter and have it be self-documenting to 
know what the units are, instead of requiring looking at the field type 
definition to know the units.  I _think_ that will be intuitive?  This doesn't 
preclude adding a distanceUnits attribute on the field type to be used as a 
default for distance|area|area2D, which may be nice; I'm +0 on that 
(ambivalent).

> Add score=degrees|kilometers|miles for AbstractSpatialFieldType
> ---------------------------------------------------------------
>
>                 Key: SOLR-6797
>                 URL: https://issues.apache.org/jira/browse/SOLR-6797
>             Project: Solr
>          Issue Type: Improvement
>          Components: spatial
>            Reporter: David Smiley
>
> Annoyingly, the units="degrees" attribute is required for fields extending 
> AbstractSpatialFieldType (e.g. RPT, BBox).  And it doesn't really have any 
> effect.  I propose the following:
> * Simply drop the attribute; ignore it if someone sets it to "degrees" (for 
> back-compat).
> * When using score="distance", or score=area or area2D (as seen in BBoxField) 
> then use kilometers if geo=true, otherwise degrees.
> * Add support for score=degrees|kilometers|miles|degrees



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to