lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From busc...@apache.org
Subject svn commit: r824111 - in /lucene/java/trunk: ./ src/java/org/apache/lucene/search/ src/java/org/apache/lucene/search/function/ src/java/org/apache/lucene/search/spans/ src/test/org/apache/lucene/search/
Date Sun, 11 Oct 2009 17:17:42 GMT
Author: buschmi
Date: Sun Oct 11 17:17:40 2009
New Revision: 824111

URL: http://svn.apache.org/viewvc?rev=824111&view=rev
Log:
LUCENE-1970: Remove deprecated DocIdSetIterator methods.

Modified:
    lucene/java/trunk/CHANGES.txt
    lucene/java/trunk/src/java/org/apache/lucene/search/BooleanScorer.java
    lucene/java/trunk/src/java/org/apache/lucene/search/BooleanScorer2.java
    lucene/java/trunk/src/java/org/apache/lucene/search/ConjunctionScorer.java
    lucene/java/trunk/src/java/org/apache/lucene/search/ConstantScoreQuery.java
    lucene/java/trunk/src/java/org/apache/lucene/search/DisjunctionMaxScorer.java
    lucene/java/trunk/src/java/org/apache/lucene/search/DisjunctionSumScorer.java
    lucene/java/trunk/src/java/org/apache/lucene/search/DocIdSetIterator.java
    lucene/java/trunk/src/java/org/apache/lucene/search/FieldCacheRangeFilter.java
    lucene/java/trunk/src/java/org/apache/lucene/search/FieldCacheTermsFilter.java
    lucene/java/trunk/src/java/org/apache/lucene/search/FilteredDocIdSetIterator.java
    lucene/java/trunk/src/java/org/apache/lucene/search/FilteredQuery.java
    lucene/java/trunk/src/java/org/apache/lucene/search/MatchAllDocsQuery.java
    lucene/java/trunk/src/java/org/apache/lucene/search/PhraseScorer.java
    lucene/java/trunk/src/java/org/apache/lucene/search/ReqExclScorer.java
    lucene/java/trunk/src/java/org/apache/lucene/search/ReqOptSumScorer.java
    lucene/java/trunk/src/java/org/apache/lucene/search/ScoreCachingWrappingScorer.java
    lucene/java/trunk/src/java/org/apache/lucene/search/TermScorer.java
    lucene/java/trunk/src/java/org/apache/lucene/search/function/CustomScoreQuery.java
    lucene/java/trunk/src/java/org/apache/lucene/search/function/ValueSourceQuery.java
    lucene/java/trunk/src/java/org/apache/lucene/search/spans/SpanScorer.java
    lucene/java/trunk/src/test/org/apache/lucene/search/JustCompileSearch.java
    lucene/java/trunk/src/test/org/apache/lucene/search/TestBooleanScorer.java
    lucene/java/trunk/src/test/org/apache/lucene/search/TestDocIdSet.java
    lucene/java/trunk/src/test/org/apache/lucene/search/TestPositiveScoresOnlyCollector.java
    lucene/java/trunk/src/test/org/apache/lucene/search/TestScoreCachingWrappingScorer.java

Modified: lucene/java/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/trunk/CHANGES.txt?rev=824111&r1=824110&r2=824111&view=diff
==============================================================================
--- lucene/java/trunk/CHANGES.txt (original)
+++ lucene/java/trunk/CHANGES.txt Sun Oct 11 17:17:40 2009
@@ -41,6 +41,9 @@
 
 * LUCENE-1968: Remove deprecated methods in PriorityQueue. (Michael Busch)
 
+* LUCENE-1970: Remove deprecated methods in DocIdSetIterator and make
+               new ones abstract. (Michael Busch)
+
 Bug fixes
 
 * LUCENE-1951: When the text provided to WildcardQuery has no wildcard

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/BooleanScorer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/BooleanScorer.java?rev=824111&r1=824110&r2=824111&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/BooleanScorer.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/BooleanScorer.java Sun Oct 11 17:17:40
2009
@@ -116,23 +116,14 @@
     
     public int advance(int target) throws IOException { return NO_MORE_DOCS; }
 
-    /** @deprecated use {@link #docID()} instead. */
-    public int doc() { return doc; }
-
     public int docID() { return doc; }
 
     public Explanation explain(int doc) throws IOException { return null; }
     
-    /** @deprecated use {@link #nextDoc()} instead. */
-    public boolean next() throws IOException { return false; }
-
     public int nextDoc() throws IOException { return NO_MORE_DOCS; }
     
     public float score() throws IOException { return score; }
     
-    /** @deprecated use {@link #advance(int)} instead. */
-    public boolean skipTo(int target) throws IOException { return false; }
-    
   }
 
   static final class Bucket {
@@ -289,9 +280,6 @@
     throw new UnsupportedOperationException();
   }
 
-  /** @deprecated use {@link #docID()} instead. */
-  public int doc() { return current.doc; }
-  
   public int docID() {
     return doc;
   }
@@ -300,11 +288,6 @@
     throw new UnsupportedOperationException();
   }
 
-  /** @deprecated use {@link #nextDoc()} instead. */
-  public boolean next() throws IOException {
-    return nextDoc() != NO_MORE_DOCS;
-  }
-  
   public int nextDoc() throws IOException {
     boolean more;
     do {
@@ -351,11 +334,6 @@
     score(new HitCollectorWrapper(hc));
   }
   
-  /** @deprecated use {@link #advance(int)} instead. */
-  public boolean skipTo(int target) {
-    throw new UnsupportedOperationException();
-  }
-
   public String toString() {
     StringBuilder buffer = new StringBuilder();
     buffer.append("boolean(");

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/BooleanScorer2.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/BooleanScorer2.java?rev=824111&r1=824110&r2=824111&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/BooleanScorer2.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/BooleanScorer2.java Sun Oct 11 17:17:40
2009
@@ -124,24 +124,12 @@
       }
       return lastDocScore;
     }
-    /** @deprecated use {@link #docID()} instead. */
-    public int doc() {
-      return scorer.doc();
-    }
     public int docID() {
       return scorer.docID();
     }
-    /** @deprecated use {@link #nextDoc()} instead. */
-    public boolean next() throws IOException {
-      return scorer.nextDoc() != NO_MORE_DOCS;
-    }
     public int nextDoc() throws IOException {
       return scorer.nextDoc();
     }
-    /** @deprecated use {@link #advance(int)} instead. */
-    public boolean skipTo(int docNr) throws IOException {
-      return scorer.advance(docNr) != NO_MORE_DOCS;
-    }
     public int advance(int target) throws IOException {
       return scorer.advance(target);
     }
@@ -316,18 +304,10 @@
     return doc != NO_MORE_DOCS;
   }
 
-  /** @deprecated use {@link #docID()} instead. */
-  public int doc() { return countingSumScorer.doc(); }
-
   public int docID() {
     return doc;
   }
   
-  /** @deprecated use {@link #nextDoc()} instead. */
-  public boolean next() throws IOException {
-    return nextDoc() != NO_MORE_DOCS;
-  }
-
   public int nextDoc() throws IOException {
     return doc = countingSumScorer.nextDoc();
   }
@@ -338,11 +318,6 @@
     return sum * coordinator.coordFactors[coordinator.nrMatchers];
   }
 
-  /** @deprecated use {@link #advance(int)} instead. */
-  public boolean skipTo(int target) throws IOException {
-    return advance(target) != NO_MORE_DOCS;
-  }
-
   public int advance(int target) throws IOException {
     return doc = countingSumScorer.advance(target);
   }

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/ConjunctionScorer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/ConjunctionScorer.java?rev=824111&r1=824110&r2=824111&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/ConjunctionScorer.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/ConjunctionScorer.java Sun Oct 11
17:17:40 2009
@@ -109,9 +109,6 @@
     return lastDoc = doNext();
   }
 
-  /** @deprecated use {@link #docID()} instead. */
-  public int doc() { return lastDoc; }
-
   public int docID() {
     return lastDoc;
   }
@@ -120,11 +117,6 @@
     throw new UnsupportedOperationException();
   }
 
-  /** @deprecated use {@link #nextDoc()} instead. */
-  public boolean next() throws IOException {
-    return nextDoc() != NO_MORE_DOCS;
-  }
-
   public int nextDoc() throws IOException {
     if (lastDoc == NO_MORE_DOCS) {
       return lastDoc;
@@ -142,10 +134,4 @@
     }
     return sum * coord;
   }
-
-  /** @deprecated use {@link #advance(int)} instead. */
-  public boolean skipTo(int target) throws IOException {
-    return advance(target) != NO_MORE_DOCS;
-  }
-
 }

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/ConstantScoreQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/ConstantScoreQuery.java?rev=824111&r1=824110&r2=824111&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/ConstantScoreQuery.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/ConstantScoreQuery.java Sun Oct 11
17:17:40 2009
@@ -123,20 +123,10 @@
       }
     }
 
-    /** @deprecated use {@link #nextDoc()} instead. */
-    public boolean next() throws IOException {
-      return docIdSetIterator.nextDoc() != NO_MORE_DOCS;
-    }
-
     public int nextDoc() throws IOException {
       return docIdSetIterator.nextDoc();
     }
     
-    /** @deprecated use {@link #docID()} instead. */
-    public int doc() {
-      return docIdSetIterator.doc();
-    }
-    
     public int docID() {
       return docIdSetIterator.docID();
     }
@@ -145,11 +135,6 @@
       return theScore;
     }
 
-    /** @deprecated use {@link #advance(int)} instead. */
-    public boolean skipTo(int target) throws IOException {
-      return docIdSetIterator.advance(target) != NO_MORE_DOCS;
-    }
-
     public int advance(int target) throws IOException {
       return docIdSetIterator.advance(target);
     }

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/DisjunctionMaxScorer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/DisjunctionMaxScorer.java?rev=824111&r1=824110&r2=824111&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/DisjunctionMaxScorer.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/DisjunctionMaxScorer.java Sun Oct
11 17:17:40 2009
@@ -62,16 +62,6 @@
     heapify();
   }
 
-  /**
-   * Generate the next document matching our associated DisjunctionMaxQuery.
-   * 
-   * @return true iff there is a next document
-   * @deprecated use {@link #nextDoc()} instead.
-   */
-  public boolean next() throws IOException {
-    return nextDoc() != NO_MORE_DOCS;
-  }
-
   public int nextDoc() throws IOException {
     if (numScorers == 0) return doc = NO_MORE_DOCS;
     while (subScorers[0].docID() == doc) {
@@ -88,11 +78,6 @@
     return doc = subScorers[0].docID();
   }
 
-  /** @deprecated use {@link #docID()} instead. */
-  public int doc() {
-    return subScorers[0].doc();
-  }
-
   public int docID() {
     return doc;
   }
@@ -120,20 +105,6 @@
     }
   }
 
-  /**
-   * Advance to the first document beyond the current whose number is greater
-   * than or equal to target.
-   * 
-   * @param target
-   *          the minimum number of the next desired document
-   * @return true iff there is a document to be generated whose number is at
-   *         least target
-   * @deprecated use {@link #advance(int)} instead.
-   */
-  public boolean skipTo(int target) throws IOException {
-    return advance(target) != NO_MORE_DOCS;
-  }
-
   public int advance(int target) throws IOException {
     if (numScorers == 0) return doc = NO_MORE_DOCS;
     while (subScorers[0].docID() < target) {

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/DisjunctionSumScorer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/DisjunctionSumScorer.java?rev=824111&r1=824110&r2=824111&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/DisjunctionSumScorer.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/DisjunctionSumScorer.java Sun Oct
11 17:17:40 2009
@@ -161,11 +161,6 @@
     return true;
   }
 
-  /** @deprecated use {@link #nextDoc()} instead. */
-  public boolean next() throws IOException {
-    return nextDoc() != NO_MORE_DOCS;
-  }
-
   public int nextDoc() throws IOException {
     if (scorerDocQueue.size() < minimumNrMatchers || !advanceAfterCurrent()) {
       currentDoc = NO_MORE_DOCS;
@@ -222,9 +217,6 @@
    */
   public float score() throws IOException { return currentScore; }
    
-  /** @deprecated use {@link #docID()} instead. */
-  public int doc() { return currentDoc; }
-
   public int docID() {
     return currentDoc;
   }
@@ -237,22 +229,6 @@
   }
 
   /**
-   * Skips to the first match beyond the current whose document number is
-   * greater than or equal to a given target. <br>
-   * When this method is used the {@link #explain(int)} method should not be
-   * used. <br>
-   * The implementation uses the skipTo() method on the subscorers.
-   * 
-   * @param target
-   *          The target document number.
-   * @return true iff there is such a match.
-   * @deprecated use {@link #advance(int)} instead.
-   */
-  public boolean skipTo(int target) throws IOException {
-    return advance(target) != NO_MORE_DOCS;
-  }
-
-  /**
    * Advances to the first match beyond the current whose document number is
    * greater than or equal to a given target. <br>
    * When this method is used the {@link #explain(int)} method should not be

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/DocIdSetIterator.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/DocIdSetIterator.java?rev=824111&r1=824110&r2=824111&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/DocIdSetIterator.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/DocIdSetIterator.java Sun Oct 11 17:17:40
2009
@@ -28,7 +28,6 @@
  */
 public abstract class DocIdSetIterator {
   
-  // TODO (3.0): review the javadocs and remove any references to '3.0'.
   private int doc = -1;
   
   /**
@@ -38,16 +37,6 @@
   public static final int NO_MORE_DOCS = Integer.MAX_VALUE;
 
   /**
-   * Unsupported anymore. Call {@link #docID()} instead. This method throws
-   * {@link UnsupportedOperationException} if called.
-   * 
-   * @deprecated use {@link #docID()} instead.
-   */
-  public int doc() {
-    throw new UnsupportedOperationException("Call docID() instead.");
-  }
-
-  /**
    * Returns the following:
    * <ul>
    * <li>-1 or {@link #NO_MORE_DOCS} if {@link #nextDoc()} or
@@ -56,56 +45,22 @@
    * <li>Otherwise it should return the doc ID it is currently on.
    * </ul>
    * <p>
-   * <b>NOTE:</b> in 3.0, this method will become abstract.
    * 
    * @since 2.9
    */
-  public int docID() {
-    return doc;
-  }
-
-  /**
-   * Unsupported anymore. Call {@link #nextDoc()} instead. This method throws
-   * {@link UnsupportedOperationException} if called.
-   * 
-   * @deprecated use {@link #nextDoc()} instead. This will be removed in 3.0
-   */
-  public boolean next() throws IOException {
-    throw new UnsupportedOperationException("Call nextDoc() instead.");
-  }
-
-  /**
-   * Unsupported anymore. Call {@link #advance(int)} instead. This method throws
-   * {@link UnsupportedOperationException} if called.
-   * 
-   * @deprecated use {@link #advance(int)} instead. This will be removed in 3.0
-   */
-  public boolean skipTo(int target) throws IOException {
-    throw new UnsupportedOperationException("Call advance() instead.");
-  }
+  public abstract int docID();
 
   /**
    * Advances to the next document in the set and returns the doc it is
    * currently on, or {@link #NO_MORE_DOCS} if there are no more docs in the
    * set.<br>
    * 
-   * <b>NOTE:</b> in 3.0 this method will become abstract, following the removal
-   * of {@link #next()}. For backward compatibility it is implemented as:
-   * 
-   * <pre>
-   * public int nextDoc() throws IOException {
-   *   return next() ? doc() : NO_MORE_DOCS;
-   * }
-   * </pre>
-   * 
    * <b>NOTE:</b> after the iterator has exhausted you should not call this
    * method, as it may result in unpredicted behavior.
    * 
    * @since 2.9
    */
-  public int nextDoc() throws IOException {
-    return doc = next() ? doc() : NO_MORE_DOCS;
-  }
+  public abstract int nextDoc() throws IOException;
 
   /**
    * Advances to the first beyond the current whose document number is greater
@@ -136,16 +91,9 @@
    * <b>NOTE:</b> after the iterator has exhausted you should not call this
    * method, as it may result in unpredicted behavior.
    * <p>
-   * <b>NOTE:</b> in 3.0 this method will become abstract, following the removal
-   * of {@link #skipTo(int)}.
    * 
    * @since 2.9
    */
-  public int advance(int target) throws IOException {
-    if (target == NO_MORE_DOCS) {
-      return doc = NO_MORE_DOCS;
-    }
-    return doc = skipTo(target) ? doc() : NO_MORE_DOCS;
-  }
+  public abstract int advance(int target) throws IOException;
 
 }

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/FieldCacheRangeFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/FieldCacheRangeFilter.java?rev=824111&r1=824110&r2=824111&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/FieldCacheRangeFilter.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/FieldCacheRangeFilter.java Sun Oct
11 17:17:40 2009
@@ -496,21 +496,6 @@
         return new DocIdSetIterator() {
           private int doc = -1;
           
-          /** @deprecated use {@link #nextDoc()} instead. */
-          public boolean next() throws IOException {
-            return nextDoc() != NO_MORE_DOCS;
-          }
-          
-          /** @deprecated use {@link #advance(int)} instead. */
-          public boolean skipTo(int target) throws IOException {
-            return advance(target) != NO_MORE_DOCS;
-          }
-
-          /** @deprecated use {@link #docID()} instead. */
-          public int doc() {
-            return termDocs.doc();
-          }
-          
           public int docID() {
             return doc;
           }
@@ -539,21 +524,6 @@
         return new DocIdSetIterator() {
           private int doc = -1;
           
-          /** @deprecated use {@link #nextDoc()} instead. */
-          public boolean next() throws IOException {
-            return nextDoc() != NO_MORE_DOCS;
-          }
-          
-          /** @deprecated use {@link #advance(int)} instead. */
-          public boolean skipTo(int target) throws IOException {
-            return advance(target) != NO_MORE_DOCS;
-          }
-
-          /** @deprecated use {@link #docID()} instead. */
-          public int doc() {
-            return doc;
-          }
-
           public int docID() {
             return doc;
           }

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/FieldCacheTermsFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/FieldCacheTermsFilter.java?rev=824111&r1=824110&r2=824111&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/FieldCacheTermsFilter.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/FieldCacheTermsFilter.java Sun Oct
11 17:17:40 2009
@@ -138,20 +138,10 @@
     protected class FieldCacheTermsFilterDocIdSetIterator extends DocIdSetIterator {
       private int doc = -1;
 
-      /** @deprecated use {@link #docID()} instead. */
-      public int doc() {
-        return doc;
-      }
-      
       public int docID() {
         return doc;
       }
 
-      /** @deprecated use {@link #nextDoc()} instead. */
-      public boolean next() {
-        return nextDoc() != NO_MORE_DOCS;
-      }
-      
       public int nextDoc() {
         try {
           while (!openBitSet.fastGet(fcsi.order[++doc])) {}
@@ -161,11 +151,6 @@
         return doc;
       }
 
-      /** @deprecated use {@link #advance(int)} instead. */
-      public boolean skipTo(int target) {
-        return advance(target) != NO_MORE_DOCS;
-      }
-      
       public int advance(int target) {
         try {
           doc = target;

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/FilteredDocIdSetIterator.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/FilteredDocIdSetIterator.java?rev=824111&r1=824110&r2=824111&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/FilteredDocIdSetIterator.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/FilteredDocIdSetIterator.java Sun
Oct 11 17:17:40 2009
@@ -49,20 +49,10 @@
    */
   abstract protected boolean match(int doc) throws IOException;
 	
-  /** @deprecated use {@link #docID()} instead. */
-  public final int doc() {
-    return doc;
-  }
-
   public int docID() {
     return doc;
   }
   
-  /** @deprecated use {@link #nextDoc()} instead. */
-  public final boolean next() throws IOException{
-    return nextDoc() != NO_MORE_DOCS;
-  }
-
   public int nextDoc() throws IOException {
     while ((doc = _innerIter.nextDoc()) != NO_MORE_DOCS) {
       if (match(doc)) {
@@ -72,11 +62,6 @@
     return doc;
   }
   
-  /** @deprecated use {@link #advance(int)} instead. */
-  public final boolean skipTo(int n) throws IOException{
-    return advance(n) != NO_MORE_DOCS;
-  }
-  
   public int advance(int target) throws IOException {
     doc = _innerIter.advance(target);
     if (doc != NO_MORE_DOCS) {

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/FilteredQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/FilteredQuery.java?rev=824111&r1=824110&r2=824111&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/FilteredQuery.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/FilteredQuery.java Sun Oct 11 17:17:40
2009
@@ -130,11 +130,6 @@
             return scorerDoc;
           }
 
-          /** @deprecated use {@link #nextDoc()} instead. */
-          public boolean next() throws IOException {
-            return nextDoc() != NO_MORE_DOCS;
-          }
-
           public int nextDoc() throws IOException {
             int scorerDoc, disiDoc;
             return doc = (disiDoc = docIdSetIterator.nextDoc()) != NO_MORE_DOCS
@@ -142,15 +137,8 @@
                 && advanceToCommon(scorerDoc, disiDoc) != NO_MORE_DOCS ? scorer.docID()
: NO_MORE_DOCS;
           }
           
-          /** @deprecated use {@link #docID()} instead. */
-          public int doc() { return scorer.doc(); }
           public int docID() { return doc; }
           
-          /** @deprecated use {@link #advance(int)} instead. */
-          public boolean skipTo(int i) throws IOException {
-            return advance(i) != NO_MORE_DOCS;
-          }
-          
           public int advance(int target) throws IOException {
             int disiDoc, scorerDoc;
             return doc = (disiDoc = docIdSetIterator.advance(target)) != NO_MORE_DOCS

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/MatchAllDocsQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/MatchAllDocsQuery.java?rev=824111&r1=824110&r2=824111&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/MatchAllDocsQuery.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/MatchAllDocsQuery.java Sun Oct 11
17:17:40 2009
@@ -61,20 +61,10 @@
       return null; // not called... see MatchAllDocsWeight.explain()
     }
 
-    /** @deprecated use {@link #docID()} instead. */
-    public int doc() {
-      return termDocs.doc();
-    }
-    
     public int docID() {
       return doc;
     }
 
-    /** @deprecated use {@link #nextDoc()} instead. */
-    public boolean next() throws IOException {
-      return nextDoc() != NO_MORE_DOCS;
-    }
-
     public int nextDoc() throws IOException {
       return doc = termDocs.next() ? termDocs.doc() : NO_MORE_DOCS;
     }
@@ -83,11 +73,6 @@
       return norms == null ? score : score * Similarity.decodeNorm(norms[docID()]);
     }
 
-    /** @deprecated use {@link #advance(int)} instead. */
-    public boolean skipTo(int target) throws IOException {
-      return advance(target) != NO_MORE_DOCS;
-    }
-
     public int advance(int target) throws IOException {
       return doc = termDocs.skipTo(target) ? termDocs.doc() : NO_MORE_DOCS;
     }

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/PhraseScorer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/PhraseScorer.java?rev=824111&r1=824110&r2=824111&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/PhraseScorer.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/PhraseScorer.java Sun Oct 11 17:17:40
2009
@@ -69,16 +69,8 @@
     first.doc = -1;
   }
 
-  /** @deprecated use {@link #docID()} instead. */
-  public int doc() { return first.doc; }
-  
   public int docID() { return first.doc; }
 
-  /** @deprecated use {@link #nextDoc()} instead. */
-  public boolean next() throws IOException {
-    return nextDoc() != NO_MORE_DOCS;
-  }
-
   public int nextDoc() throws IOException {
     if (firstTime) {
       init();
@@ -118,11 +110,6 @@
     return norms == null ? raw : raw * Similarity.decodeNorm(norms[first.doc]); // normalize
   }
 
-  /** @deprecated use {@link #advance(int)} instead. */
-  public boolean skipTo(int target) throws IOException {
-    return advance(target) != NO_MORE_DOCS;
-  }
-
   public int advance(int target) throws IOException {
     firstTime = false;
     for (PhrasePositions pp = first; more && pp != null; pp = pp.next) {

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/ReqExclScorer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/ReqExclScorer.java?rev=824111&r1=824110&r2=824111&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/ReqExclScorer.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/ReqExclScorer.java Sun Oct 11 17:17:40
2009
@@ -41,11 +41,6 @@
     this.exclDisi = exclDisi;
   }
 
-  /** @deprecated use {@link #nextDoc()} instead. */
-  public boolean next() throws IOException {
-    return nextDoc() != NO_MORE_DOCS;
-  }
-
   public int nextDoc() throws IOException {
     if (reqScorer == null) {
       return doc;
@@ -93,11 +88,6 @@
     return NO_MORE_DOCS;
   }
 
-  /** @deprecated use {@link #docID()} instead. */
-  public int doc() {
-    return reqScorer.doc(); // reqScorer may be null when next() or skipTo() already return
false
-  }
-  
   public int docID() {
     return doc;
   }
@@ -110,11 +100,6 @@
     return reqScorer.score(); // reqScorer may be null when next() or skipTo() already return
false
   }
   
-  /** @deprecated use {@link #advance(int)} instead. */
-  public boolean skipTo(int target) throws IOException {
-    return advance(target) != NO_MORE_DOCS;
-  }
-
   public int advance(int target) throws IOException {
     if (reqScorer == null) {
       return doc = NO_MORE_DOCS;

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/ReqOptSumScorer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/ReqOptSumScorer.java?rev=824111&r1=824110&r2=824111&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/ReqOptSumScorer.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/ReqOptSumScorer.java Sun Oct 11 17:17:40
2009
@@ -43,29 +43,14 @@
     this.optScorer = optScorer;
   }
 
-  /** @deprecated use {@link #nextDoc()} instead. */
-  public boolean next() throws IOException {
-    return reqScorer.next();
-  }
-
   public int nextDoc() throws IOException {
     return reqScorer.nextDoc();
   }
   
-  /** @deprecated use {@link #advance(int)} instead. */
-  public boolean skipTo(int target) throws IOException {
-    return reqScorer.skipTo(target);
-  }
-
   public int advance(int target) throws IOException {
     return reqScorer.advance(target);
   }
   
-  /** @deprecated use {@link #docID()} instead. */
-  public int doc() {
-    return reqScorer.doc();
-  }
-
   public int docID() {
     return reqScorer.docID();
   }

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/ScoreCachingWrappingScorer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/ScoreCachingWrappingScorer.java?rev=824111&r1=824110&r2=824111&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/ScoreCachingWrappingScorer.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/ScoreCachingWrappingScorer.java Sun
Oct 11 17:17:40 2009
@@ -64,20 +64,10 @@
     return curScore;
   }
 
-  /** @deprecated use {@link #docID()} instead. */
-  public int doc() {
-    return scorer.doc();
-  }
-  
   public int docID() {
     return scorer.docID();
   }
 
-  /** @deprecated use {@link #nextDoc()} instead. */
-  public boolean next() throws IOException {
-    return scorer.next();
-  }
-
   public int nextDoc() throws IOException {
     return scorer.nextDoc();
   }
@@ -86,11 +76,6 @@
     scorer.score(collector);
   }
   
-  /** @deprecated use {@link #advance(int)} instead. */
-  public boolean skipTo(int target) throws IOException {
-    return scorer.skipTo(target);
-  }
-
   public int advance(int target) throws IOException {
     return scorer.advance(target);
   }

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/TermScorer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/TermScorer.java?rev=824111&r1=824110&r2=824111&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/TermScorer.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/TermScorer.java Sun Oct 11 17:17:40
2009
@@ -100,9 +100,6 @@
     return true;
   }
 
-  /** @deprecated use {@link #docID()} instead. */
-  public int doc() { return doc; }
-  
   public int docID() { return doc; }
 
   /**
@@ -110,18 +107,6 @@
    * The iterator over the matching documents is buffered using
    * {@link TermDocs#read(int[],int[])}.
    * 
-   * @return true iff there is another document matching the query.
-   * @deprecated use {@link #nextDoc()} instead.
-   */
-  public boolean next() throws IOException {
-    return nextDoc() != NO_MORE_DOCS;
-  }
-
-  /**
-   * Advances to the next document matching the query. <br>
-   * The iterator over the matching documents is buffered using
-   * {@link TermDocs#read(int[],int[])}.
-   * 
    * @return the document matching the query or -1 if there are no more documents.
    */
   public int nextDoc() throws IOException {
@@ -151,20 +136,6 @@
   }
 
   /**
-   * Skips to the first match beyond the current whose document number is
-   * greater than or equal to a given target. <br>
-   * The implementation uses {@link TermDocs#skipTo(int)}.
-   * 
-   * @param target
-   *          The target document number.
-   * @return true iff there is such a match.
-   * @deprecated use {@link #advance(int)} instead.
-   */
-  public boolean skipTo(int target) throws IOException {
-    return advance(target) != NO_MORE_DOCS;
-  }
-
-  /**
    * Advances to the first match beyond the current whose document number is
    * greater than or equal to a given target. <br>
    * The implementation uses {@link TermDocs#skipTo(int)}.

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/function/CustomScoreQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/function/CustomScoreQuery.java?rev=824111&r1=824110&r2=824111&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/function/CustomScoreQuery.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/function/CustomScoreQuery.java Sun
Oct 11 17:17:40 2009
@@ -401,11 +401,6 @@
       this.vScores = new float[valSrcScorers.length];
     }
 
-    /** @deprecated use {@link #nextDoc()} instead. */
-    public boolean next() throws IOException {
-      return nextDoc() != NO_MORE_DOCS;
-    }
-
     public int nextDoc() throws IOException {
       int doc = subQueryScorer.nextDoc();
       if (doc != NO_MORE_DOCS) {
@@ -416,11 +411,6 @@
       return doc;
     }
 
-    /** @deprecated use {@link #docID()} instead. */
-    public int doc() {
-      return subQueryScorer.doc();
-    }
-
     public int docID() {
       return subQueryScorer.docID();
     }
@@ -433,11 +423,6 @@
       return qWeight * customScore(subQueryScorer.docID(), subQueryScorer.score(), vScores);
     }
 
-    /** @deprecated use {@link #advance(int)} instead. */
-    public boolean skipTo(int target) throws IOException {
-      return advance(target) != NO_MORE_DOCS;
-    }
-
     public int advance(int target) throws IOException {
       int doc = subQueryScorer.advance(target);
       if (doc != NO_MORE_DOCS) {

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/function/ValueSourceQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/function/ValueSourceQuery.java?rev=824111&r1=824110&r2=824111&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/function/ValueSourceQuery.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/function/ValueSourceQuery.java Sun
Oct 11 17:17:40 2009
@@ -126,38 +126,23 @@
       termDocs = reader.termDocs(null);
     }
 
-    /** @deprecated use {@link #nextDoc()} instead. */
-    public boolean next() throws IOException {
-      return termDocs.next();
-    }
-
     public int nextDoc() throws IOException {
       return doc = termDocs.next() ? termDocs.doc() : NO_MORE_DOCS;
     }
     
-    /** @deprecated use {@link #docID()} instead. */
-    public int doc() {
-      return termDocs.doc();
-    }
-
     public int docID() {
       return doc;
     }
     
+    public int advance(int target) throws IOException {
+      return doc = termDocs.skipTo(target) ? termDocs.doc() : NO_MORE_DOCS;
+    }
+    
     /*(non-Javadoc) @see org.apache.lucene.search.Scorer#score() */
     public float score() throws IOException {
       return qWeight * vals.floatVal(termDocs.doc());
     }
 
-    /** @deprecated use {@link #advance(int)} instead. */
-    public boolean skipTo(int target) throws IOException {
-      return termDocs.skipTo(target);
-    }
-    
-    public int advance(int target) throws IOException {
-      return doc = termDocs.skipTo(target) ? termDocs.doc() : NO_MORE_DOCS;
-    }
-
     /*(non-Javadoc) @see org.apache.lucene.search.Scorer#explain(int) */
     public Explanation explain(int doc) throws IOException {
       float sc = qWeight * vals.floatVal(doc);

Modified: lucene/java/trunk/src/java/org/apache/lucene/search/spans/SpanScorer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/search/spans/SpanScorer.java?rev=824111&r1=824110&r2=824111&view=diff
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/search/spans/SpanScorer.java (original)
+++ lucene/java/trunk/src/java/org/apache/lucene/search/spans/SpanScorer.java Sun Oct 11 17:17:40
2009
@@ -55,11 +55,6 @@
     }
   }
 
-  /** @deprecated use {@link #nextDoc()} instead. */
-  public boolean next() throws IOException {
-    return nextDoc() != NO_MORE_DOCS;
-  }
-
   public int nextDoc() throws IOException {
     if (!setFreqCurrentDoc()) {
       doc = NO_MORE_DOCS;
@@ -67,11 +62,6 @@
     return doc;
   }
 
-  /** @deprecated use {@link #advance(int)} instead. */
-  public boolean skipTo(int target) throws IOException {
-    return advance(target) != NO_MORE_DOCS;
-  }
-
   public int advance(int target) throws IOException {
     if (!more) {
       return doc = NO_MORE_DOCS;
@@ -99,9 +89,6 @@
     return true;
   }
 
-  /** @deprecated use {@link #docID()} instead. */
-  public int doc() { return doc; }
-  
   public int docID() { return doc; }
 
   public float score() throws IOException {

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=824111&r1=824110&r2=824111&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 Sun Oct 11
17:17:40 2009
@@ -159,25 +159,10 @@
 
   static final class JustCompileDocIdSetIterator extends DocIdSetIterator {
 
-    /** @deprecated delete in 3.0 */
-    public int doc() {
-      throw new UnsupportedOperationException(UNSUPPORTED_MSG);
-    }
-    
     public int docID() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
-    /** @deprecated delete in 3.0 */
-    public boolean next() throws IOException {
-      throw new UnsupportedOperationException(UNSUPPORTED_MSG);
-    }
-
-    /** @deprecated delete in 3.0 */
-    public boolean skipTo(int target) throws IOException {
-      throw new UnsupportedOperationException(UNSUPPORTED_MSG);
-    }
-    
     public int nextDoc() throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
@@ -339,25 +324,10 @@
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
-    /** @deprecated delete in 3.0 */
-    public int doc() {
-      throw new UnsupportedOperationException(UNSUPPORTED_MSG);
-    }
-    
     public int docID() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
-    /** @deprecated delete in 3.0. */
-    public boolean next() throws IOException {
-      throw new UnsupportedOperationException(UNSUPPORTED_MSG);
-    }
-
-    /** @deprecated delete in 3.0. */
-    public boolean skipTo(int target) throws IOException {
-      throw new UnsupportedOperationException(UNSUPPORTED_MSG);
-    }
-
     public int nextDoc() throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestBooleanScorer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestBooleanScorer.java?rev=824111&r1=824110&r2=824111&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestBooleanScorer.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestBooleanScorer.java Sun Oct 11
17:17:40 2009
@@ -82,21 +82,12 @@
       private int doc = -1;
       public Explanation explain(int doc) throws IOException { return null; }
       public float score() throws IOException { return 0; }
-      /** @deprecated delete in 3.0. */
-      public int doc() { return 3000; }
       public int docID() { return doc; }
-      /** @deprecated delete in 3.0 */
-      public boolean next() throws IOException { return nextDoc() != NO_MORE_DOCS; }
       
       public int nextDoc() throws IOException {
         return doc = doc == -1 ? 3000 : NO_MORE_DOCS;
       }
 
-      /** @deprecated delete in 3.0 */
-      public boolean skipTo(int target) throws IOException {
-        return advance(target) != NO_MORE_DOCS;
-      }
-      
       public int advance(int target) throws IOException {
         return doc = target <= 3000 ? 3000 : NO_MORE_DOCS;
       }

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestDocIdSet.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestDocIdSet.java?rev=824111&r1=824110&r2=824111&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestDocIdSet.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestDocIdSet.java Sun Oct 11 17:17:40
2009
@@ -48,31 +48,16 @@
 
             int docid = -1;
             
-            /** @deprecated use {@link #docID()} instead. */
-            public int doc() {
-              return docid;
-            }
-
             public int docID() {
               return docid;
             }
             
-            /** @deprecated use {@link #nextDoc()} instead. */
-            public boolean next() throws IOException {
-              return nextDoc() != NO_MORE_DOCS;
-            }
-
             //@Override
             public int nextDoc() throws IOException {
               docid++;
               return docid < maxdoc ? docid : (docid = NO_MORE_DOCS);
             }
 
-            /** @deprecated use {@link #advance(int)} instead. */
-            public boolean skipTo(int target) throws IOException {
-              return advance(target) != NO_MORE_DOCS;
-            }
-            
             //@Override
             public int advance(int target) throws IOException {
               while (nextDoc() < target) {}

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestPositiveScoresOnlyCollector.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestPositiveScoresOnlyCollector.java?rev=824111&r1=824110&r2=824111&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestPositiveScoresOnlyCollector.java
(original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestPositiveScoresOnlyCollector.java
Sun Oct 11 17:17:40 2009
@@ -36,25 +36,12 @@
       return idx == scores.length ? Float.NaN : scores[idx];
     }
 
-    /** @deprecated use {@link #docID()} instead. */
-    public int doc() { return idx; }
-    
     public int docID() { return idx; }
 
-    /** @deprecated use {@link #nextDoc()} instead. */
-    public boolean next() throws IOException {
-      return nextDoc() != NO_MORE_DOCS;
-    }
-
     public int nextDoc() throws IOException {
       return ++idx != scores.length ? idx : NO_MORE_DOCS;
     }
     
-    /** @deprecated use {@link #advance(int)} instead. */
-    public boolean skipTo(int target) throws IOException {
-      return advance(target) != NO_MORE_DOCS;
-    }
-    
     public int advance(int target) throws IOException {
       idx = target;
       return idx < scores.length ? idx : NO_MORE_DOCS;

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/TestScoreCachingWrappingScorer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/TestScoreCachingWrappingScorer.java?rev=824111&r1=824110&r2=824111&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/TestScoreCachingWrappingScorer.java
(original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/TestScoreCachingWrappingScorer.java
Sun Oct 11 17:17:40 2009
@@ -42,25 +42,12 @@
       return idx == scores.length ? Float.NaN : scores[idx++];
     }
 
-    /** @deprecated use {@link #docID()} instead. */
-    public int doc() { return doc; }
-    
     public int docID() { return doc; }
 
-    /** @deprecated use {@link #nextDoc()} instead. */
-    public boolean next() throws IOException { 
-      return nextDoc() != NO_MORE_DOCS;
-    }
-
     public int nextDoc() throws IOException {
       return ++doc < scores.length ? doc : NO_MORE_DOCS;
     }
     
-    /** @deprecated use {@link #advance(int)} instead. */
-    public boolean skipTo(int target) throws IOException {
-      return advance(target) != NO_MORE_DOCS;
-    }
-    
     public int advance(int target) throws IOException {
       doc = target;
       return doc < scores.length ? doc : NO_MORE_DOCS;



Mime
View raw message