lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gsing...@apache.org
Subject svn commit: r933942 - in /lucene/dev/trunk: lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/ lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/projections/ solr/src/test/org/apache/solr/schema/
Date Wed, 14 Apr 2010 13:25:10 GMT
Author: gsingers
Date: Wed Apr 14 13:25:10 2010
New Revision: 933942

URL: http://svn.apache.org/viewvc?rev=933942&view=rev
Log:
LUCENE-2184: clean up API a bit more, test still fails

Modified:
    lucene/dev/trunk/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/CartesianPolyFilterBuilder.java
    lucene/dev/trunk/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/projections/CartesianTierPlotter.java
    lucene/dev/trunk/solr/src/test/org/apache/solr/schema/PolyFieldTest.java

Modified: lucene/dev/trunk/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/CartesianPolyFilterBuilder.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/CartesianPolyFilterBuilder.java?rev=933942&r1=933941&r2=933942&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/CartesianPolyFilterBuilder.java
(original)
+++ lucene/dev/trunk/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/CartesianPolyFilterBuilder.java
Wed Apr 14 13:25:10 2010
@@ -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

Modified: lucene/dev/trunk/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/projections/CartesianTierPlotter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/projections/CartesianTierPlotter.java?rev=933942&r1=933941&r2=933942&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/projections/CartesianTierPlotter.java
(original)
+++ lucene/dev/trunk/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/projections/CartesianTierPlotter.java
Wed Apr 14 13:25:10 2010
@@ -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));

Modified: lucene/dev/trunk/solr/src/test/org/apache/solr/schema/PolyFieldTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/test/org/apache/solr/schema/PolyFieldTest.java?rev=933942&r1=933941&r2=933942&view=diff
==============================================================================
--- lucene/dev/trunk/solr/src/test/org/apache/solr/schema/PolyFieldTest.java (original)
+++ lucene/dev/trunk/solr/src/test/org/apache/solr/schema/PolyFieldTest.java Wed Apr 14 13:25:10
2010
@@ -215,7 +215,7 @@ public class PolyFieldTest extends SolrT
       }
     }
 
-    assertQ(req("fl", "*,score", "q", qry.toString()),
+    assertQ(req("fl", "*,score", "indent", "true", "q", qry.toString()),
             "//*[@numFound='1']");
     clearIndex();
   }



Mime
View raw message