[
https://issues.apache.org/jira/browse/SOLR-6797?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Smiley updated SOLR-6797:
-------------------------------
Attachment: SOLR-6797.patch
Here's a patch, modified from the most recent one you (Ishan) put up on
ReviewBoard. I hoped to upload it to the same review ticket but I saw no way
to do so... perhaps since you created it only you can? I'd appreciate it it
you add this one if for no other reason then to see what my changes were
exactly.
>From memory...
* A test or two failed and it was related to a modification to the schema to
use kilometers without correspondingly updated maxDistErr.
* Some places were checking units.equals("degrees") when in fact the
distanceUnits can be used because you've got a back-compat instance.
* I refactored the units & distanceUnits initialization logic. It should be
equivalent, I think. I didn't want parseDistanceUnits concerned with
initialization-only logic.
* Moved DistanceUnits out of the spatial sub-package you made... it was the
only class there and I felt it didn't warrant a package. New packages require
package level javadocs too. "ant precommit" exposes such things.
> 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
> Assignee: David Smiley
> Fix For: 5.0, Trunk
>
> Attachments: SOLR-6797.patch, SOLR-6797.patch, SOLR-6797.patch,
> SOLR-6797.patch, SOLR-6797.patch, SOLR-6797.patch
>
>
> 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]