From 8529cabc7cf751d71d1f72b4cff95d31361d4076 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 15 Mar 2010 02:08:55 +0000 Subject: [PATCH] as of trunk, the geohash encoding is fixed (thanks chris male), so fix this test git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/branches/solr@923029 13f79535-47bb-0310-9956-ffa450edef68 --- .../solr/search/function/distance/DistanceFunctionTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/org/apache/solr/search/function/distance/DistanceFunctionTest.java b/src/test/org/apache/solr/search/function/distance/DistanceFunctionTest.java index 4b6b1a6c579..6b379dedeee 100644 --- a/src/test/org/apache/solr/search/function/distance/DistanceFunctionTest.java +++ b/src/test/org/apache/solr/search/function/distance/DistanceFunctionTest.java @@ -59,7 +59,7 @@ public class DistanceFunctionTest extends AbstractSolrTestCase { //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 extends AbstractSolrTestCase { ); - 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 {