You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by rm...@apache.org on 2010/03/15 03:08:56 UTC

svn commit: r923029 - /lucene/solr/branches/solr/src/test/org/apache/solr/search/function/distance/DistanceFunctionTest.java

Author: rmuir
Date: Mon Mar 15 02:08:55 2010
New Revision: 923029

URL: http://svn.apache.org/viewvc?rev=923029&view=rev
Log:
as of trunk, the geohash encoding is fixed (thanks chris male), so fix this test

Modified:
    lucene/solr/branches/solr/src/test/org/apache/solr/search/function/distance/DistanceFunctionTest.java

Modified: lucene/solr/branches/solr/src/test/org/apache/solr/search/function/distance/DistanceFunctionTest.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/solr/src/test/org/apache/solr/search/function/distance/DistanceFunctionTest.java?rev=923029&r1=923028&r2=923029&view=diff
==============================================================================
--- lucene/solr/branches/solr/src/test/org/apache/solr/search/function/distance/DistanceFunctionTest.java (original)
+++ lucene/solr/branches/solr/src/test/org/apache/solr/search/function/distance/DistanceFunctionTest.java Mon Mar 15 02:08:55 2010
@@ -59,7 +59,7 @@ public class DistanceFunctionTest extend
     //Geo Hash Haversine
     //Can verify here: http://www.movable-type.co.uk/scripts/latlong.html, but they use a slightly different radius for the earth, so just be close
     assertQ(req("fl", "*,score", "q", "{!func}ghhsin(" + Constants.EARTH_RADIUS_KM + ", gh_s, \"" + GeoHashUtils.encode(32, -79) +
-            "\",)", "fq", "id:1"), "//float[@name='score']='122.30894'");
+            "\",)", "fq", "id:1"), "//float[@name='score']='122.309006'");
 
     assertQ(req("fl", "id,point_hash,score", "q", "{!func}recip(ghhsin(" + Constants.EARTH_RADIUS_KM + ", point_hash, \"" + GeoHashUtils.encode(32, -79) + "\"), 1, 1, 0)"),
             "//*[@numFound='7']", 
@@ -68,7 +68,7 @@ public class DistanceFunctionTest extend
             );
 
 
-    assertQ(req("fl", "*,score", "q", "{!func}ghhsin(" + Constants.EARTH_RADIUS_KM + ", gh_s, geohash(32, -79))", "fq", "id:1"), "//float[@name='score']='122.30894'");
+    assertQ(req("fl", "*,score", "q", "{!func}ghhsin(" + Constants.EARTH_RADIUS_KM + ", gh_s, geohash(32, -79))", "fq", "id:1"), "//float[@name='score']='122.309006'");
   }
 
   public void testVector() throws Exception {