mirror of https://github.com/apache/lucene.git
SOLR-2125: add a fine grained distance test
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1001010 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f8c0293d85
commit
21ca796da8
|
@ -103,6 +103,7 @@ public class SpatialFilterTest extends SolrTestCaseJ4 {
|
|||
assertU(adoc("id", "15", fieldName, "0,15"));
|
||||
//3000KM from 0,0, see http://www.movable-type.co.uk/scripts/latlong.html
|
||||
assertU(adoc("id", "16", fieldName, "18.71111,19.79750"));
|
||||
assertU(adoc("id", "17", fieldName, "44.043900,-95.436643"));
|
||||
assertU(commit());
|
||||
|
||||
checkHits(fieldName, "0,0", 1000, 1, 14);
|
||||
|
@ -110,6 +111,9 @@ public class SpatialFilterTest extends SolrTestCaseJ4 {
|
|||
checkHits(fieldName, "0,0", 3000, 3, 14, 15, 16);
|
||||
checkHits(fieldName, "0,0", 3001, 3, 14, 15, 16);
|
||||
checkHits(fieldName, "0,0", 3000.1, 3, 14, 15, 16);
|
||||
//really fine grained distance and reflects some of the vagaries of how we are calculating the box
|
||||
checkHits(fieldName, "43.517030,-96.789603", 109, 0);
|
||||
checkHits(fieldName, "43.517030,-96.789603", 110, 1, 17);
|
||||
}
|
||||
|
||||
private void checkHits(String fieldName, String pt, double distance, int count, int ... docIds) {
|
||||
|
|
Loading…
Reference in New Issue