LUCENE-2184: clean up API a bit more, test still fails

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@933942 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Grant Ingersoll 2010-04-14 13:25:10 +00:00
parent ddae6f06db
commit 4238a84026
3 changed files with 5 additions and 9 deletions

View File

@ -69,7 +69,7 @@ public class CartesianPolyFilterBuilder {
double longUpperRight = upperRight.getLng();
double longLowerLeft = lowerLeft.getLng();
CartesianTierPlotter ctp = new CartesianTierPlotter( miles, projector, tierPrefix, minTier, maxTier );
CartesianTierPlotter ctp = new CartesianTierPlotter( CartesianTierPlotter.bestFit(miles, minTier, maxTier), projector, tierPrefix);
Shape shape = new Shape(ctp.getTierLevelId());
if (longUpperRight < longLowerLeft) { // Box cross the 180 meridian

View File

@ -50,10 +50,6 @@ public class CartesianTierPlotter {
setTierVerticalPosDivider();
}
public CartesianTierPlotter(double radius, IProjector projector,
String fieldPrefix, int minTier, int maxTier) {
this(CartesianTierPlotter.bestFit(radius, minTier, maxTier), projector, fieldPrefix);
}
private void setTierLength (){
this.tierLength = (int) Math.pow(2 , this.tierLevel);
@ -144,15 +140,15 @@ public class CartesianTierPlotter {
* Distances less than a mile return 15, finer granularity is
* in accurate
*/
static public int bestFit(double range) {
public static int bestFit(double range) {
return bestFit(range, DEFALT_MIN_TIER, DEFALT_MAX_TIER, DistanceUnits.MILES);
}
static public int bestFit(double range, int minTier, int maxTier) {
public static int bestFit(double range, int minTier, int maxTier) {
return bestFit(range, minTier, maxTier, DistanceUnits.MILES);
}
static public int bestFit(double range, int minTier, int maxTier, DistanceUnits distanceUnit) {
public static int bestFit(double range, int minTier, int maxTier, DistanceUnits distanceUnit) {
double times = distanceUnit.earthCircumference() / (2.0d * range);
int bestFit = (int) Math.ceil(log2(times));

View File

@ -215,7 +215,7 @@ public class PolyFieldTest extends SolrTestCaseJ4 {
}
}
assertQ(req("fl", "*,score", "q", qry.toString()),
assertQ(req("fl", "*,score", "indent", "true", "q", qry.toString()),
"//*[@numFound='1']");
clearIndex();
}