mirror of https://github.com/apache/lucene.git
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:
parent
5cc19567b9
commit
8529cabc7c
|
@ -59,7 +59,7 @@ public class DistanceFunctionTest extends AbstractSolrTestCase {
|
||||||
//Geo Hash Haversine
|
//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
|
//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) +
|
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)"),
|
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']",
|
"//*[@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 {
|
public void testVector() throws Exception {
|
||||||
|
|
Loading…
Reference in New Issue