lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r801207 - in /lucene/java/trunk: contrib/remote/src/test/org/apache/lucene/search/ contrib/spatial/src/java/org/apache/lucene/spatial/tier/ src/java/org/apache/lucene/search/ src/test/org/apache/lucene/search/
Date Wed, 05 Aug 2009 13:08:59 GMT
Author: mikemccand
Date: Wed Aug  5 13:08:58 2009
New Revision: 801207

URL: http://svn.apache.org/viewvc?rev=801207&view=rev
Log:
LUCENE-1779: improve javadocs & remove unused args from unreleased sorting APIs

Modified:
    lucene/java/trunk/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSort.java
    lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceFieldComparatorSource.java
    lucene/java/trunk/src/java/org/apache/lucene/search/FieldComparator.java
    lucene/java/trunk/src/java/org/apache/lucene/search/FieldValueHitQueue.java
    lucene/java/trunk/src/java/org/apache/lucene/search/SortField.java
    lucene/java/trunk/src/java/org/apache/lucene/search/TopFieldCollector.java
    lucene/java/trunk/src/test/org/apache/lucene/search/JustCompileSearch.java
    lucene/java/trunk/src/test/org/apache/lucene/search/TestElevationComparator.java
    lucene/java/trunk/src/test/org/apache/lucene/search/TestSort.java

Modified: lucene/java/trunk/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSort.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSort.java?rev=801207&r1=801206&r2=801207&view=diff
==============================================================================
--- lucene/java/trunk/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSort.java
(original)
+++ lucene/java/trunk/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSort.java
Wed Aug  5 13:08:58 2009
@@ -210,7 +210,7 @@
       bottomValue = slotValues[bottom];
     }
 
-    public void setNextReader(IndexReader reader, int docBase, int numSlotsFull) throws IOException
{
+    public void setNextReader(IndexReader reader, int docBase) throws IOException {
       docValues = FieldCache.DEFAULT.getInts(reader, "parser", new FieldCache.IntParser()
{
           public final int parseInt(final String val) {
             return (val.charAt(0)-'A') * 123456;
@@ -218,10 +218,6 @@
         });
     }
 
-    public int sortType() {
-      return 0;
-    }
-
     public Comparable value(int slot) {
       return new Integer(slotValues[slot]);
     }

Modified: lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceFieldComparatorSource.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceFieldComparatorSource.java?rev=801207&r1=801206&r2=801207&view=diff
==============================================================================
--- lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceFieldComparatorSource.java
(original)
+++ lucene/java/trunk/contrib/spatial/src/java/org/apache/lucene/spatial/tier/DistanceFieldComparatorSource.java
Wed Aug  5 13:08:58 2009
@@ -108,8 +108,8 @@
 		}
 
 		@Override
-		public void setNextReader(IndexReader reader, int docBase,
-				int numSlotsFull) throws IOException {
+                  public void setNextReader(IndexReader reader, int docBase)
+                  throws IOException {
 			
 			// each reader in a segmented base
 			// has an offset based on the maxDocs of previous readers
@@ -120,12 +120,6 @@
 		public Comparable<Double> value(int slot) {
 			return values[slot];
 		}
-
-		@Override
-		public int sortType() {
-
-			return SortField.DOUBLE;
-		}
 	}
 
 }

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/FieldComparator.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/FieldComparator.java?rev=801207&r1=801206&r2=801207&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/FieldComparator.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/FieldComparator.java Wed Aug  5 13:08:58
2009
@@ -31,12 +31,53 @@
 import org.apache.lucene.search.FieldCache.StringIndex;
 
 /**
- * A FieldComparator compares hits across multiple IndexReaders.
- * 
- * A comparator can compare a hit at hit 'slot a' with hit 'slot b',
- * compare a hit on 'doc i' with hit 'slot a', or copy a hit at 'doc i'
- * to 'slot a'. Each slot refers to a hit while each doc refers to the
- * current IndexReader.
+ * Expert: a FieldComparator compares hits so as to determine their
+ * sort order when collecting the top results with {@link
+ * TopFieldCollector}.  The concrete public FieldComparator
+ * classes here correspond to the SortField types.
+ *
+ * <p>This API is designed to achieve high performance
+ * sorting, by exposing a tight interaction with {@link
+ * FieldValueHitQueue} as it visits hits.  Whenever a hit is
+ * competitive, it's enrolled into a virtual slot, which is
+ * an int ranging from 0 to numHits-1.  The {@link
+ * FieldComparator} is made aware of segment transitions
+ * during searching in case any internal state it's tracking
+ * needs to be recomputed during these transitions.</p>
+ *
+ * <p>A comparator must define these functions:</p>
+ *
+ * <ul>
+ *
+ *  <li> {@link #compare} Compare a hit at 'slot a'
+ *       with hit 'slot b'.
+ *
+ *  <li> {@link #setBottom} This method is called by
+ *       {@link FieldValueHitQueue} to notify the
+ *       FieldComparator of the current weakest ("bottom")
+ *       slot.  Note that this slot may not hold the weakest
+ *       value according to your comparator, in cases where
+ *       your comparator is not the primary one (ie, is only
+ *       used to break ties from the comparators before it).
+ *
+ *  <li> {@link #compareBottom} Compare a new hit (docID)
+ *       against the "weakest" (bottom) entry in the queue.
+ *
+ *  <li> {@link #copy} Installs a new hit into the
+ *       priority queue.  The {@link FieldValueHitQueue}
+ *       calls this method when a new hit is competitive.
+ *
+ *  <li> {@link #setNextReader} Invoked
+ *       when the search is switching to the next segment.
+ *       You may need to update internal state of the
+ *       comparator, for example retrieving new values from
+ *       the {@link FieldCache}.
+ *
+ *  <li> {@link #value} Return the sort value stored in
+ *       the specified slot.  This is only called at the end
+ *       of the search, in order to populate {@link
+ *       FieldDoc#fields} when returning the top results.
+ * </ul>
  *
  * <b>NOTE:</b> This API is experimental and might change in
  * incompatible ways in the next release.
@@ -70,7 +111,7 @@
       values[slot] = currentReaderValues[doc];
     }
 
-    public void setNextReader(IndexReader reader, int docBase,  int numSlotsFull) throws
IOException {
+    public void setNextReader(IndexReader reader, int docBase) throws IOException {
       currentReaderValues = FieldCache.DEFAULT.getBytes(reader, field, parser);
     }
     
@@ -78,10 +119,6 @@
       this.bottom = values[bottom];
     }
 
-    public int sortType() {
-      return SortField.BYTE;
-    }
-
     public Comparable value(int slot) {
       return new Byte(values[slot]);
     }
@@ -111,7 +148,7 @@
       docIDs[slot] = docBase + doc;
     }
 
-    public void setNextReader(IndexReader reader, int docBase, int numSlotsFull) {
+    public void setNextReader(IndexReader reader, int docBase) {
       // TODO: can we "map" our docIDs to the current
       // reader? saves having to then subtract on every
       // compare call
@@ -122,10 +159,6 @@
       this.bottom = docIDs[bottom];
     }
 
-    public int sortType() {
-      return SortField.DOC;
-    }
-
     public Comparable value(int slot) {
       return new Integer(docIDs[slot]);
     }
@@ -173,7 +206,7 @@
       values[slot] = currentReaderValues[doc];
     }
 
-    public void setNextReader(IndexReader reader, int docBase, int numSlotsFull) throws IOException
{
+    public void setNextReader(IndexReader reader, int docBase) throws IOException {
       currentReaderValues = FieldCache.DEFAULT.getDoubles(reader, field, parser);
     }
     
@@ -181,10 +214,6 @@
       this.bottom = values[bottom];
     }
 
-    public int sortType() {
-      return SortField.DOUBLE;
-    }
-
     public Comparable value(int slot) {
       return new Double(values[slot]);
     }
@@ -236,7 +265,7 @@
       values[slot] = currentReaderValues[doc];
     }
 
-    public void setNextReader(IndexReader reader, int docBase,  int numSlotsFull) throws
IOException {
+    public void setNextReader(IndexReader reader, int docBase) throws IOException {
       currentReaderValues = FieldCache.DEFAULT.getFloats(reader, field, parser);
     }
     
@@ -244,10 +273,6 @@
       this.bottom = values[bottom];
     }
 
-    public int sortType() {
-      return SortField.FLOAT;
-    }
-
     public Comparable value(int slot) {
       return new Float(values[slot]);
     }
@@ -303,7 +328,7 @@
       values[slot] = currentReaderValues[doc];
     }
 
-    public void setNextReader(IndexReader reader, int docBase,  int numSlotsFull) throws
IOException {
+    public void setNextReader(IndexReader reader, int docBase) throws IOException {
       currentReaderValues = FieldCache.DEFAULT.getInts(reader, field, parser);
     }
     
@@ -311,10 +336,6 @@
       this.bottom = values[bottom];
     }
 
-    public int sortType() {
-      return SortField.INT;
-    }
-
     public Comparable value(int slot) {
       return new Integer(values[slot]);
     }
@@ -366,7 +387,7 @@
       values[slot] = currentReaderValues[doc];
     }
 
-    public void setNextReader(IndexReader reader, int docBase,  int numSlotsFull) throws
IOException {
+    public void setNextReader(IndexReader reader, int docBase) throws IOException {
       currentReaderValues = FieldCache.DEFAULT.getLongs(reader, field, parser);
     }
     
@@ -374,10 +395,6 @@
       this.bottom = values[bottom];
     }
 
-    public int sortType() {
-      return SortField.LONG;
-    }
-
     public Comparable value(int slot) {
       return new Long(values[slot]);
     }
@@ -413,7 +430,7 @@
       scores[slot] = scorer.score();
     }
 
-    public void setNextReader(IndexReader reader, int docBase,  int numSlotsFull) {
+    public void setNextReader(IndexReader reader, int docBase) {
     }
     
     public void setBottom(final int bottom) {
@@ -426,10 +443,6 @@
       this.scorer = new ScoreCachingWrappingScorer(scorer);
     }
     
-    public int sortType() {
-      return SortField.SCORE;
-    }
-
     public Comparable value(int slot) {
       return new Float(scores[slot]);
     }
@@ -462,7 +475,7 @@
       values[slot] = currentReaderValues[doc];
     }
 
-    public void setNextReader(IndexReader reader, int docBase,  int numSlotsFull) throws
IOException {
+    public void setNextReader(IndexReader reader, int docBase) throws IOException {
       currentReaderValues = FieldCache.DEFAULT.getShorts(reader, field, parser);
     }
     
@@ -470,10 +483,6 @@
       this.bottom = values[bottom];
     }
 
-    public int sortType() {
-      return SortField.BYTE;
-    }
-
     public Comparable value(int slot) {
       return new Short(values[slot]);
     }
@@ -526,7 +535,7 @@
       values[slot] = currentReaderValues[doc];
     }
 
-    public void setNextReader(IndexReader reader, int docBase,  int numSlotsFull) throws
IOException {
+    public void setNextReader(IndexReader reader, int docBase) throws IOException {
       currentReaderValues = FieldCache.DEFAULT.getStrings(reader, field);
     }
     
@@ -534,18 +543,20 @@
       this.bottom = values[bottom];
     }
 
-    public int sortType() {
-      return SortField.STRING;
-    }
-
     public Comparable value(int slot) {
       return values[slot];
     }
   }
 
-  // NOTE: there were a number of other interesting String
-  // comparators explored, but this one seemed to perform
-  // best all around.  See LUCENE-1483 for details.
+  /** Sorts by field's natural String sort order, using
+   *  ordinals.  This is functionally equivalent to {@link
+   *  StringValComparator}, but it first resolves the string
+   *  to their relative ordinal positions (using the index
+   *  returned by {@link FieldCache#getStringIndex}), and
+   *  does most comparisons using the ordinals.  For medium
+   *  to large results, this comparator will be much faster
+   *  than {@link StringValComparator}.  For very small
+   *  result sets it may be slower. */
   public static final class StringOrdValComparator extends FieldComparator {
 
     private final int[] ords;
@@ -652,7 +663,7 @@
       readerGen[slot] = currentReaderGen;
     }
 
-    public void setNextReader(IndexReader reader, int docBase,  int numSlotsFull) throws
IOException {
+    public void setNextReader(IndexReader reader, int docBase) throws IOException {
       StringIndex currentReaderValues = FieldCache.DEFAULT.getStringIndex(reader, field);
       currentReaderGen++;
       order = currentReaderValues.order;
@@ -675,10 +686,6 @@
       bottomValue = values[bottom];
     }
 
-    public int sortType() {
-      return SortField.STRING;
-    }
-
     public Comparable value(int slot) {
       return values[slot];
     }
@@ -744,7 +751,7 @@
       values[slot] = currentReaderValues[doc];
     }
 
-    public void setNextReader(IndexReader reader, int docBase, int numSlotsFull) throws IOException
{
+    public void setNextReader(IndexReader reader, int docBase) throws IOException {
       currentReaderValues = FieldCache.DEFAULT.getStrings(reader, field);
     }
     
@@ -752,10 +759,6 @@
       this.bottom = values[bottom];
     }
 
-    public int sortType() {
-      return SortField.STRING_VAL;
-    }
-
     public Comparable value(int slot) {
       return values[slot];
     }
@@ -788,7 +791,7 @@
   }
 
   /**
-   * Compare hit at slot1 with hit at slot2.  Return 
+   * Compare hit at slot1 with hit at slot2.
    * 
    * @param slot1 first slot to compare
    * @param slot2 second slot to compare
@@ -799,16 +802,25 @@
   public abstract int compare(int slot1, int slot2);
 
   /**
-   * Set the bottom queue slot, ie the "weakest" (sorted
-   * last) entry in the queue.
+   * Set the bottom slot, ie the "weakest" (sorted last)
+   * entry in the queue.  When {@link #compareBottom} is
+   * called, you should compare against this slot.  This
+   * will always be called before {@link #compareBottom}.
    * 
-   * @param slot the currently weakest (sorted lost) slot in the queue
+   * @param slot the currently weakest (sorted last) slot in the queue
    */
   public abstract void setBottom(final int slot);
 
   /**
    * Compare the bottom of the queue with doc.  This will
-   * only invoked after setBottom has been called.  
+   * only invoked after setBottom has been called.  This
+   * should return the same result as {@link
+   * #compare(int,int)}} as if bottom were slot1 and the new
+   * document were slot 2.
+   *    
+   * <p>For a search that hits many results, this method
+   * will be the hotspot (invoked by far the most
+   * frequently).</p>
    * 
    * @param doc that was hit
    * @return any N < 0 if the doc's value is sorted after
@@ -819,7 +831,10 @@
   public abstract int compareBottom(int doc) throws IOException;
 
   /**
-   * Copy hit (doc,score) to hit slot.
+   * This method is called when a new hit is competitive.
+   * You should copy any state associated with this document
+   * that will be required for future comparisons, into the
+   * specified slot.
    * 
    * @param slot which slot to copy the hit to
    * @param doc docID relative to current reader
@@ -834,22 +849,21 @@
    * @throws IOException
    * @throws IOException
    */
-  public abstract void setNextReader(IndexReader reader, int docBase, int numSlotsFull) throws
IOException;
+  public abstract void setNextReader(IndexReader reader, int docBase) throws IOException;
 
-  /** Sets the Scorer to use in case a document's score is needed. */
+  /** Sets the Scorer to use in case a document's score is
+   *  needed.
+   * 
+   * @param scorer Scorer instance that you should use to
+   * obtain the current hit's score, if necessary. */
   public void setScorer(Scorer scorer) {
     // Empty implementation since most comparators don't need the score. This
     // can be overridden by those that need it.
   }
   
   /**
-   * @return SortField.TYPE
-   */
-  public abstract int sortType();
-
-  /**
-   * Return the actual value at slot.
-   * 
+   * Return the actual value in the slot.
+   *
    * @param slot the value
    * @return value in this slot upgraded to Comparable
    */

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/FieldValueHitQueue.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/FieldValueHitQueue.java?rev=801207&r1=801206&r2=801207&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/FieldValueHitQueue.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/FieldValueHitQueue.java Wed Aug  5
13:08:58 2009
@@ -76,7 +76,7 @@
       SortField field = fields[0];
       // AUTO is resolved before we are called
       assert field.getType() != SortField.AUTO;
-      comparator = field.getComparator(size, 0, field.reverse);
+      comparator = field.getComparator(size, 0);
       oneReverseMul = field.reverse ? -1 : 1;
 
       comparators[0] = comparator;
@@ -127,7 +127,7 @@
         assert field.getType() != SortField.AUTO;
 
         reverseMul[i] = field.reverse ? -1 : 1;
-        comparators[i] = field.getComparator(size, i, field.reverse);
+        comparators[i] = field.getComparator(size, i);
       }
 
       initialize(size);

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/SortField.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/SortField.java?rev=801207&r1=801206&r2=801207&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/SortField.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/SortField.java Wed Aug  5 13:08:58
2009
@@ -443,16 +443,20 @@
   }
 
 
-  /** Returns the {@link FieldComparator} to use for sorting.
+  /** Returns the {@link FieldComparator} to use for
+   * sorting.
+   *
+   * <b>NOTE:</b> This API is experimental and might change in
+   * incompatible ways in the next release.
+   *
    * @param numHits number of top hits the queue will store
    * @param sortPos position of this SortField within {@link
    *   Sort}.  The comparator is primary if sortPos==0,
    *   secondary if sortPos==1, etc.  Some comparators can
    *   optimize themselves when they are the primary sort.
-   * @param reversed True if the SortField is reversed
    * @return {@link FieldComparator} to use when sorting
    */
-  public FieldComparator getComparator(final int numHits, final int sortPos, final boolean
reversed) throws IOException {
+  public FieldComparator getComparator(final int numHits, final int sortPos) throws IOException
{
 
     if (locale != null) {
       // TODO: it'd be nice to allow FieldCache.getStringIndex
@@ -488,10 +492,10 @@
 
     case SortField.CUSTOM:
       assert factory == null && comparatorSource != null;
-      return comparatorSource.newComparator(field, numHits, sortPos, reversed);
+      return comparatorSource.newComparator(field, numHits, sortPos, reverse);
 
     case SortField.STRING:
-      return new FieldComparator.StringOrdValComparator(numHits, field, sortPos, reversed);
+      return new FieldComparator.StringOrdValComparator(numHits, field, sortPos, reverse);
 
     case SortField.STRING_VAL:
       return new FieldComparator.StringValComparator(numHits, field);

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/TopFieldCollector.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/TopFieldCollector.java?rev=801207&r1=801206&r2=801207&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/TopFieldCollector.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/TopFieldCollector.java Wed Aug  5
13:08:58 2009
@@ -87,9 +87,8 @@
     }
     
     public void setNextReader(IndexReader reader, int docBase) throws IOException {
-      final int numSlotsFull = queueFull ? numHits : totalHits;
       this.docBase = docBase;
-      comparator.setNextReader(reader, docBase, numSlotsFull);
+      comparator.setNextReader(reader, docBase);
     }
     
     public void setScorer(Scorer scorer) throws IOException {
@@ -428,10 +427,9 @@
     }
 
     public void setNextReader(IndexReader reader, int docBase) throws IOException {
-      final int numSlotsFull = queueFull ? numHits : totalHits;
       this.docBase = docBase;
       for (int i = 0; i < comparators.length; i++) {
-        comparators[i].setNextReader(reader, docBase, numSlotsFull);
+        comparators[i].setNextReader(reader, docBase);
       }
     }
 

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/JustCompileSearch.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/JustCompileSearch.java?rev=801207&r1=801206&r2=801207&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/JustCompileSearch.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/JustCompileSearch.java Wed Aug  5
13:08:58 2009
@@ -221,15 +221,11 @@
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
-    public void setNextReader(IndexReader reader, int docBase, int numSlotsFull)
+    public void setNextReader(IndexReader reader, int docBase)
         throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
-    public int sortType() {
-      throw new UnsupportedOperationException(UNSUPPORTED_MSG);
-    }
-
     public Comparable value(int slot) {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestElevationComparator.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestElevationComparator.java?rev=801207&r1=801206&r2=801207&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestElevationComparator.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestElevationComparator.java Wed Aug
 5 13:08:58 2009
@@ -21,7 +21,6 @@
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
 import org.apache.lucene.index.*;
-import org.apache.lucene.search.*;
 import org.apache.lucene.store.*;
 import org.apache.lucene.util.LuceneTestCase;
 
@@ -165,14 +164,10 @@
        values[slot] = docVal(doc);
      }
 
-     public void setNextReader(IndexReader reader, int docBase, int numSlotsFull) throws
IOException {
+     public void setNextReader(IndexReader reader, int docBase) throws IOException {
        idIndex = FieldCache.DEFAULT.getStringIndex(reader, fieldname);
      }
 
-     public int sortType() {
-       return SortField.CUSTOM;
-     }
-
      public Comparable value(int slot) {
        return new Integer(values[slot]);
      }

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestSort.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestSort.java?rev=801207&r1=801206&r2=801207&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestSort.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestSort.java Wed Aug  5 13:08:58
2009
@@ -412,7 +412,7 @@
       bottomValue = slotValues[bottom];
     }
 
-    public void setNextReader(IndexReader reader, int docBase, int numSlotsFull) throws IOException
{
+    public void setNextReader(IndexReader reader, int docBase) throws IOException {
       docValues = FieldCache.DEFAULT.getInts(reader, "parser", new FieldCache.IntParser()
{
           public final int parseInt(final String val) {
             return (val.charAt(0)-'A') * 123456;
@@ -420,10 +420,6 @@
         });
     }
 
-    public int sortType() {
-      return 0;
-    }
-
     public Comparable value(int slot) {
       return new Integer(slotValues[slot]);
     }



Mime
View raw message