lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dsmiley <...@git.apache.org>
Subject [GitHub] lucene-solr pull request #323: SOLR-11731: LatLonPointSpatialField could be ...
Date Mon, 12 Mar 2018 15:28:50 GMT
Github user dsmiley commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/323#discussion_r173838087
  
    --- Diff: solr/core/src/java/org/apache/solr/schema/LatLonPointSpatialField.java ---
    @@ -75,8 +77,16 @@ protected SpatialStrategy newSpatialStrategy(String fieldName) {
         return new LatLonPointSpatialStrategy(ctx, fieldName, schemaField.indexed(), schemaField.hasDocValues());
       }
       
    -  public String geoValueToStringValue(long value) {
    -    return new String(decodeLatitudeCeil(value) + "," + decodeLongitudeCeil(value));
    +  /**
    +   * Converts to "lat, lon"
    +   * @param value Non-null; stored location field data
    +   * @return Non-null; "lat, lon" with 6 decimal point precision
    +   */
    +  public static String decodeDocValueToString(long value) {
    +    double latitudeDecoded = BigDecimal.valueOf(decodeLatitude((int) (value >>
32))).setScale(6, HALF_UP).doubleValue();
    --- End diff --
    
    I'm not arguing with your choice; just trying to understand.  


---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message