lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r923029 - /lucene/solr/branches/solr/src/test/org/apache/solr/search/function/distance/DistanceFunctionTest.java
Date Mon, 15 Mar 2010 02:08:56 GMT
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 {



Mime
View raw message