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
This commit is contained in:
Robert Muir 2010-03-15 02:08:55 +00:00
parent 5cc19567b9
commit 8529cabc7c
1 changed files with 2 additions and 2 deletions

View File

@ -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 {