lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gsing...@apache.org
Subject svn commit: r894362 - /lucene/solr/trunk/src/java/org/apache/solr/schema/SpatialTileField.java
Date Tue, 29 Dec 2009 11:56:18 GMT
Author: gsingers
Date: Tue Dec 29 11:56:17 2009
New Revision: 894362

URL: http://svn.apache.org/viewvc?rev=894362&view=rev
Log:
small cleanups

Modified:
    lucene/solr/trunk/src/java/org/apache/solr/schema/SpatialTileField.java

Modified: lucene/solr/trunk/src/java/org/apache/solr/schema/SpatialTileField.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/schema/SpatialTileField.java?rev=894362&r1=894361&r2=894362&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/schema/SpatialTileField.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/schema/SpatialTileField.java Tue Dec 29 11:56:17
2009
@@ -37,9 +37,9 @@
 import org.apache.solr.util.plugin.ResourceLoaderAware;
 
 import java.io.IOException;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
-import java.util.ArrayList;
 
 
 /**
@@ -50,7 +50,7 @@
  * <p/>
  * Querying directly against this field is probably not all that useful unless you specifically
know the box id
  * <p/>
- *
+ * <p/>
  * See http://wiki.apache.org/solr/SpatialSearch
  */
 public class SpatialTileField extends AbstractSubTypeFieldType implements ResourceLoaderAware
{
@@ -64,7 +64,7 @@
   private static final int DEFAULT_START_LEVEL = 4;
 
   private int start = DEFAULT_START_LEVEL, end = DEFAULT_END_LEVEL;
-  private int tileDiff = DEFAULT_END_LEVEL - DEFAULT_START_LEVEL;//we're going to need this
over and over, so cache it.
+  private int tileDiff;//we're going to need this over and over, so cache it.
   private String projectorName;
   protected List<CartesianTierPlotter> plotters;
 
@@ -83,6 +83,7 @@
     args.remove(START_LEVEL);
     args.remove(END_LEVEL);
     projectorName = p.get(PROJECTOR_CLASS, SinusoidalProjector.class.getName());
+    args.remove(PROJECTOR_CLASS);
     super.init(schema, args);
     tileDiff = (end - start) + 1;//add one since we are inclusive of the upper tier
     createSuffixCache(tileDiff);
@@ -128,6 +129,7 @@
 
   //The externalVal here is a box id, as it doesn't make sense to pick a specific tile since
that requires a distance
   //so, just OR together a search against all the tile
+
   @Override
   public Query getRangeQuery(QParser parser, SchemaField field, String part1, String part2,
boolean minInclusive,
                              boolean maxInclusive) {
@@ -180,6 +182,7 @@
   }
 
   //It never makes sense to create a single field, so make it impossible to happen
+
   @Override
   public Field createField(SchemaField field, String externalVal, float boost) {
     throw new UnsupportedOperationException("SpatialTileField uses multiple fields.  field="
+ field.getName());



Mime
View raw message