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

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

I like this patch Ishan.
There are a few bits of feedback:
* in TestBBoxStrategy, you should test a multiplier other than 1.0.  Try 2.0.
* I'm not a fan of allowing attributes to be an empty string, which this code 
allows (for distanceUnits, line 375). Normalize it or don't allow it 
(preferable, IMO).

Wow, this is a nice new test.  I like the dynamic schema modifications... 
probably much easier to test schema stuff than to always have to look at a 
separate file.  What was the template of this code (in other words, what did 
you copy-paste to get started)? schema-bm25.xml etc. looks very misplaced; 
please strip it down.  BTW, did you notice the existing spatial tests 
(particularly the new since Solr 4 ones)?  They aren't particularly obvious but 
they are TestSolr4Spatial and TestSolr4Spatial2.  

After addressing the couple items above, I think it'll be ready.

> 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
>         Attachments: 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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to