lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romseyg...@apache.org
Subject [1/2] lucene-solr:master: LUCENE-6278: Remove Scorer.freq()
Date Wed, 15 Nov 2017 12:19:35 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x bc69bdc60 -> 2fd70bfdc
  refs/heads/master cfea3d5e8 -> 183571c08


LUCENE-6278: Remove Scorer.freq()


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/183571c0
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/183571c0
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/183571c0

Branch: refs/heads/master
Commit: 183571c085201a2f1e126852647910d1930d50a6
Parents: cfea3d5
Author: Alan Woodward <romseygeek@apache.org>
Authored: Mon Nov 13 11:22:23 2017 +0000
Committer: Alan Woodward <romseygeek@apache.org>
Committed: Wed Nov 15 11:14:16 2017 +0000

----------------------------------------------------------------------
 lucene/CHANGES.txt                              |  2 +
 .../java/org/apache/lucene/index/Sorter.java    |  6 ---
 .../lucene/search/Boolean2ScorerSupplier.java   |  4 --
 .../org/apache/lucene/search/BooleanScorer.java |  1 -
 .../apache/lucene/search/CachingCollector.java  |  3 --
 .../apache/lucene/search/ConjunctionScorer.java |  5 --
 .../lucene/search/ConstantScoreQuery.java       |  8 ---
 .../lucene/search/ConstantScoreScorer.java      |  5 --
 .../apache/lucene/search/DisjunctionScorer.java | 10 ----
 .../apache/lucene/search/ExactPhraseScorer.java |  3 +-
 .../org/apache/lucene/search/FakeScorer.java    |  6 ---
 .../org/apache/lucene/search/FilterScorer.java  |  5 --
 .../lucene/search/MinShouldMatchSumScorer.java  |  7 ---
 .../apache/lucene/search/MultiPhraseQuery.java  |  2 +-
 .../org/apache/lucene/search/PhraseQuery.java   |  2 +-
 .../java/org/apache/lucene/search/Query.java    |  3 +-
 .../org/apache/lucene/search/ReqExclScorer.java |  5 --
 .../apache/lucene/search/ReqOptSumScorer.java   |  7 ---
 .../java/org/apache/lucene/search/Scorer.java   |  3 --
 .../lucene/search/SloppyPhraseScorer.java       |  3 +-
 .../org/apache/lucene/search/SynonymQuery.java  |  4 +-
 .../org/apache/lucene/search/TermQuery.java     |  2 +-
 .../org/apache/lucene/search/TermScorer.java    |  3 +-
 .../org/apache/lucene/search/package-info.java  |  6 ---
 .../apache/lucene/search/spans/SpanScorer.java  |  6 ---
 .../apache/lucene/search/JustCompileSearch.java |  5 --
 .../search/TestBoolean2ScorerSupplier.java      |  5 --
 .../search/TestBooleanQueryVisitSubscorers.java | 33 ++++++++++--
 .../lucene/search/TestCachingCollector.java     |  3 --
 .../lucene/search/TestConjunctionDISI.java      |  5 --
 .../lucene/search/TestMinShouldMatch2.java      |  7 ---
 .../search/TestPositiveScoresOnlyCollector.java |  4 --
 .../apache/lucene/search/TestQueryRescorer.java |  5 --
 .../search/TestScoreCachingWrappingScorer.java  |  4 --
 .../lucene/search/TestSloppyPhraseQuery.java    | 13 ++++-
 .../lucene/search/TestSubScorerFreqs.java       | 51 ++++++++++++++++---
 .../lucene/search/TestTopFieldCollector.java    |  5 --
 .../apache/lucene/expressions/FakeScorer.java   |  6 ---
 .../lucene/facet/DrillSidewaysScorer.java       |  5 --
 .../lucene/search/grouping/FakeScorer.java      |  6 ---
 .../search/join/BaseGlobalOrdinalScorer.java    |  5 --
 .../apache/lucene/search/join/FakeScorer.java   |  6 ---
 .../join/ParentChildrenBlockJoinQuery.java      |  5 --
 .../join/PointInSetIncludingScoreQuery.java     |  5 --
 .../search/join/TermsIncludingScoreQuery.java   |  5 --
 .../search/join/ToChildBlockJoinQuery.java      |  8 ---
 .../search/join/ToParentBlockJoinQuery.java     |  9 ----
 .../lucene/queries/function/FunctionQuery.java  |  5 --
 .../lucene/queries/function/ValueSource.java    |  5 --
 .../queries/function/ValueSourceScorer.java     |  5 --
 .../queries/payloads/PayloadScoreQuery.java     |  2 +-
 .../apache/lucene/search/CoveringScorer.java    |  6 ---
 .../lucene/search/TermAutomatonScorer.java      | 10 ++--
 .../lucene/search/TestTermAutomatonQuery.java   | 53 --------------------
 .../apache/lucene/search/AssertingScorer.java   |  7 ---
 .../lucene/search/BulkScorerWrapperScorer.java  |  8 ---
 .../lucene/search/RandomApproximationQuery.java |  5 --
 .../org/apache/solr/ltr/LTRScoringQuery.java    | 20 --------
 .../org/apache/solr/ltr/feature/Feature.java    |  5 --
 .../solr/ltr/feature/OriginalScoreFeature.java  |  5 --
 .../solr/handler/component/QueryComponent.java  |  5 --
 .../java/org/apache/solr/schema/LatLonType.java |  5 --
 .../org/apache/solr/search/join/GraphQuery.java |  6 +--
 .../apache/solr/search/TestRankQueryPlugin.java |  5 --
 64 files changed, 103 insertions(+), 365 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 31c05f6..784677e 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -57,6 +57,8 @@ API Changes
 * LUCENE-8014: Similarity.computeSlopFactor() and
   Similarity.computePayloadFactor() have been deprecated. (Alan Woodward)
 
+* LUCENE-6278: Scorer.freq() has been removed (Alan Woodward)
+
 Bug Fixes
 
 * LUCENE-7991: KNearestNeighborDocumentClassifier.knnSearch no longer applies

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/java/org/apache/lucene/index/Sorter.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/index/Sorter.java b/lucene/core/src/java/org/apache/lucene/index/Sorter.java
index 804079e..dbb8d2b 100644
--- a/lucene/core/src/java/org/apache/lucene/index/Sorter.java
+++ b/lucene/core/src/java/org/apache/lucene/index/Sorter.java
@@ -450,7 +450,6 @@ final class Sorter {
 
     float score;
     int doc = -1;
-    int freq = 1;
 
     @Override
     public int docID() {
@@ -462,11 +461,6 @@ final class Sorter {
     }
 
     @Override
-    public int freq() throws IOException {
-      return freq;
-    }
-
-    @Override
     public float score() throws IOException {
       return score;
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/java/org/apache/lucene/search/Boolean2ScorerSupplier.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/Boolean2ScorerSupplier.java b/lucene/core/src/java/org/apache/lucene/search/Boolean2ScorerSupplier.java
index b2a243e..68a4280 100644
--- a/lucene/core/src/java/org/apache/lucene/search/Boolean2ScorerSupplier.java
+++ b/lucene/core/src/java/org/apache/lucene/search/Boolean2ScorerSupplier.java
@@ -134,10 +134,6 @@ final class Boolean2ScorerSupplier extends ScorerSupplier {
           public float score() throws IOException {
             return 0f;
           }
-          @Override
-          public int freq() throws IOException {
-            return 0;
-          }
         };
       }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/java/org/apache/lucene/search/BooleanScorer.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/BooleanScorer.java b/lucene/core/src/java/org/apache/lucene/search/BooleanScorer.java
index a264dca..59b6be5 100644
--- a/lucene/core/src/java/org/apache/lucene/search/BooleanScorer.java
+++ b/lucene/core/src/java/org/apache/lucene/search/BooleanScorer.java
@@ -182,7 +182,6 @@ final class BooleanScorer extends BulkScorer {
     final FakeScorer fakeScorer = this.fakeScorer;
     final Bucket bucket = buckets[i];
     if (bucket.freq >= minShouldMatch) {
-      fakeScorer.freq = bucket.freq;
       fakeScorer.score = (float) bucket.score;
       final int doc = base | i;
       fakeScorer.doc = doc;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/java/org/apache/lucene/search/CachingCollector.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/CachingCollector.java b/lucene/core/src/java/org/apache/lucene/search/CachingCollector.java
index 344ec3a..6a14240 100644
--- a/lucene/core/src/java/org/apache/lucene/search/CachingCollector.java
+++ b/lucene/core/src/java/org/apache/lucene/search/CachingCollector.java
@@ -72,9 +72,6 @@ public abstract class CachingCollector extends FilterCollector {
       return doc;
     }
 
-    @Override
-    public final int freq() { throw new UnsupportedOperationException(); }
-
   }
 
   private static class NoScoreCachingCollector extends CachingCollector {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/java/org/apache/lucene/search/ConjunctionScorer.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/ConjunctionScorer.java b/lucene/core/src/java/org/apache/lucene/search/ConjunctionScorer.java
index 6ad4f40..e32f126 100644
--- a/lucene/core/src/java/org/apache/lucene/search/ConjunctionScorer.java
+++ b/lucene/core/src/java/org/apache/lucene/search/ConjunctionScorer.java
@@ -62,11 +62,6 @@ class ConjunctionScorer extends Scorer {
   }
 
   @Override
-  public int freq() {
-    return scorers.length;
-  }
-
-  @Override
   public Collection<ChildScorer> getChildren() {
     ArrayList<ChildScorer> children = new ArrayList<>();
     for (Scorer scorer : required) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/java/org/apache/lucene/search/ConstantScoreQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/ConstantScoreQuery.java b/lucene/core/src/java/org/apache/lucene/search/ConstantScoreQuery.java
index 7235536..90cc5b4 100644
--- a/lucene/core/src/java/org/apache/lucene/search/ConstantScoreQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/ConstantScoreQuery.java
@@ -94,10 +94,6 @@ public final class ConstantScoreQuery extends Query {
             public float score() throws IOException {
               return theScore;
             }
-            @Override
-            public int freq() throws IOException {
-              return 1;
-            }
           });
         }
       };
@@ -141,10 +137,6 @@ public final class ConstantScoreQuery extends Query {
                   return score;
                 }
                 @Override
-                public int freq() throws IOException {
-                  return 1;
-                }
-                @Override
                 public Collection<ChildScorer> getChildren() {
                   return Collections.singleton(new ChildScorer(innerScorer, "constant"));
                 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/java/org/apache/lucene/search/ConstantScoreScorer.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/ConstantScoreScorer.java b/lucene/core/src/java/org/apache/lucene/search/ConstantScoreScorer.java
index be048e5..2846388 100644
--- a/lucene/core/src/java/org/apache/lucene/search/ConstantScoreScorer.java
+++ b/lucene/core/src/java/org/apache/lucene/search/ConstantScoreScorer.java
@@ -73,10 +73,5 @@ public final class ConstantScoreScorer extends Scorer {
     return score;
   }
 
-  @Override
-  public int freq() throws IOException {
-    return 1;
-  }
-
 }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/java/org/apache/lucene/search/DisjunctionScorer.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/DisjunctionScorer.java b/lucene/core/src/java/org/apache/lucene/search/DisjunctionScorer.java
index 8180dc4..147b993 100644
--- a/lucene/core/src/java/org/apache/lucene/search/DisjunctionScorer.java
+++ b/lucene/core/src/java/org/apache/lucene/search/DisjunctionScorer.java
@@ -176,16 +176,6 @@ abstract class DisjunctionScorer extends Scorer {
   }
 
   @Override
-  public final int freq() throws IOException {
-    DisiWrapper subMatches = getSubMatches();
-    int freq = 1;
-    for (DisiWrapper w = subMatches.next; w != null; w = w.next) {
-      freq += 1;
-    }
-    return freq;
-  }
-
-  @Override
   public final float score() throws IOException {
     return score(getSubMatches());
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/java/org/apache/lucene/search/ExactPhraseScorer.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/ExactPhraseScorer.java b/lucene/core/src/java/org/apache/lucene/search/ExactPhraseScorer.java
index 002375d..f54f5f5 100644
--- a/lucene/core/src/java/org/apache/lucene/search/ExactPhraseScorer.java
+++ b/lucene/core/src/java/org/apache/lucene/search/ExactPhraseScorer.java
@@ -90,8 +90,7 @@ final class ExactPhraseScorer extends Scorer {
     return "ExactPhraseScorer(" + weight + ")";
   }
 
-  @Override
-  public int freq() {
+  final int freq() {
     return freq;
   }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/java/org/apache/lucene/search/FakeScorer.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/FakeScorer.java b/lucene/core/src/java/org/apache/lucene/search/FakeScorer.java
index 32fb405..3a357c0 100644
--- a/lucene/core/src/java/org/apache/lucene/search/FakeScorer.java
+++ b/lucene/core/src/java/org/apache/lucene/search/FakeScorer.java
@@ -24,7 +24,6 @@ import java.util.Collection;
 final class FakeScorer extends Scorer {
   float score;
   int doc = -1;
-  int freq = 1;
 
   public FakeScorer() {
     super(null);
@@ -36,11 +35,6 @@ final class FakeScorer extends Scorer {
   }
 
   @Override
-  public int freq() {
-    return freq;
-  }
-    
-  @Override
   public float score() {
     return score;
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/java/org/apache/lucene/search/FilterScorer.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/FilterScorer.java b/lucene/core/src/java/org/apache/lucene/search/FilterScorer.java
index 421100c..22c8ecb 100644
--- a/lucene/core/src/java/org/apache/lucene/search/FilterScorer.java
+++ b/lucene/core/src/java/org/apache/lucene/search/FilterScorer.java
@@ -60,11 +60,6 @@ public abstract class FilterScorer extends Scorer {
   }
 
   @Override
-  public int freq() throws IOException {
-    return in.freq();
-  }
-
-  @Override
   public final int docID() {
     return in.docID();
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/java/org/apache/lucene/search/MinShouldMatchSumScorer.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/MinShouldMatchSumScorer.java b/lucene/core/src/java/org/apache/lucene/search/MinShouldMatchSumScorer.java
index 6927371..5b56b58 100644
--- a/lucene/core/src/java/org/apache/lucene/search/MinShouldMatchSumScorer.java
+++ b/lucene/core/src/java/org/apache/lucene/search/MinShouldMatchSumScorer.java
@@ -315,13 +315,6 @@ final class MinShouldMatchSumScorer extends Scorer {
   }
 
   @Override
-  public int freq() throws IOException {
-    // we need to know about all matches
-    updateFreq();
-    return freq;
-  }
-
-  @Override
   public float score() throws IOException {
     // we need to know about all matches
     updateFreq();

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/java/org/apache/lucene/search/MultiPhraseQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/MultiPhraseQuery.java b/lucene/core/src/java/org/apache/lucene/search/MultiPhraseQuery.java
index f31716d..9f22621 100644
--- a/lucene/core/src/java/org/apache/lucene/search/MultiPhraseQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/MultiPhraseQuery.java
@@ -302,7 +302,7 @@ public class MultiPhraseQuery extends Query {
       if (scorer != null) {
         int newDoc = scorer.iterator().advance(doc);
         if (newDoc == doc) {
-          float freq = slop == 0 ? scorer.freq() : ((SloppyPhraseScorer)scorer).sloppyFreq();
+          float freq = slop == 0 ? ((ExactPhraseScorer)scorer).freq() : ((SloppyPhraseScorer)scorer).sloppyFreq();
           SimScorer docScorer = similarity.simScorer(stats, context);
           Explanation freqExplanation = Explanation.match(freq, "phraseFreq=" + freq);
           Explanation scoreExplanation = docScorer.explain(doc, freqExplanation);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/java/org/apache/lucene/search/PhraseQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/PhraseQuery.java b/lucene/core/src/java/org/apache/lucene/search/PhraseQuery.java
index b414bb2..cf1c646 100644
--- a/lucene/core/src/java/org/apache/lucene/search/PhraseQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/PhraseQuery.java
@@ -458,7 +458,7 @@ public class PhraseQuery extends Query {
       if (scorer != null) {
         int newDoc = scorer.iterator().advance(doc);
         if (newDoc == doc) {
-          float freq = slop == 0 ? scorer.freq() : ((SloppyPhraseScorer)scorer).sloppyFreq();
+          float freq = slop == 0 ? ((ExactPhraseScorer)scorer).freq() : ((SloppyPhraseScorer)scorer).sloppyFreq();
           SimScorer docScorer = similarity.simScorer(stats, context);
           Explanation freqExplanation = Explanation.match(freq, "phraseFreq=" + freq);
           Explanation scoreExplanation = docScorer.explain(doc, freqExplanation);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/java/org/apache/lucene/search/Query.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/Query.java b/lucene/core/src/java/org/apache/lucene/search/Query.java
index 05aa94f..024aa3e 100644
--- a/lucene/core/src/java/org/apache/lucene/search/Query.java
+++ b/lucene/core/src/java/org/apache/lucene/search/Query.java
@@ -59,8 +59,7 @@ public abstract class Query {
    * <p>
    * Only implemented by primitive queries, which re-write to themselves.
    *
-   * @param needsScores   True if document scores ({@link Scorer#score}) or match
-   *                      frequencies ({@link Scorer#freq}) are needed.
+   * @param needsScores   True if document scores ({@link Scorer#score}) are needed.
    * @param boost         The boost that is propagated by the parent queries.
    */
   public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/java/org/apache/lucene/search/ReqExclScorer.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/ReqExclScorer.java b/lucene/core/src/java/org/apache/lucene/search/ReqExclScorer.java
index 50a321b..38a3356 100644
--- a/lucene/core/src/java/org/apache/lucene/search/ReqExclScorer.java
+++ b/lucene/core/src/java/org/apache/lucene/search/ReqExclScorer.java
@@ -72,11 +72,6 @@ class ReqExclScorer extends Scorer {
   }
 
   @Override
-  public int freq() throws IOException {
-    return reqScorer.freq();
-  }
-
-  @Override
   public float score() throws IOException {
     return reqScorer.score(); // reqScorer may be null when next() or skipTo() already return false
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/java/org/apache/lucene/search/ReqOptSumScorer.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/ReqOptSumScorer.java b/lucene/core/src/java/org/apache/lucene/search/ReqOptSumScorer.java
index be22a6d..61e2c7e 100644
--- a/lucene/core/src/java/org/apache/lucene/search/ReqOptSumScorer.java
+++ b/lucene/core/src/java/org/apache/lucene/search/ReqOptSumScorer.java
@@ -86,13 +86,6 @@ class ReqOptSumScorer extends Scorer {
   }
 
   @Override
-  public int freq() throws IOException {
-    // we might have deferred advance()
-    score();
-    return optIterator.docID() == reqScorer.docID() ? 2 : 1;
-  }
-
-  @Override
   public Collection<ChildScorer> getChildren() {
     ArrayList<ChildScorer> children = new ArrayList<>(2);
     children.add(new ChildScorer(reqScorer, "MUST"));

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/java/org/apache/lucene/search/Scorer.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/Scorer.java b/lucene/core/src/java/org/apache/lucene/search/Scorer.java
index 7ceed33..a4d8b5e 100644
--- a/lucene/core/src/java/org/apache/lucene/search/Scorer.java
+++ b/lucene/core/src/java/org/apache/lucene/search/Scorer.java
@@ -67,9 +67,6 @@ public abstract class Scorer {
    */
   public abstract float score() throws IOException;
 
-  /** Returns the freq of this Scorer on the current document */
-  public abstract int freq() throws IOException;
-
   /** returns parent Weight
    * @lucene.experimental
    */

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/java/org/apache/lucene/search/SloppyPhraseScorer.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/SloppyPhraseScorer.java b/lucene/core/src/java/org/apache/lucene/search/SloppyPhraseScorer.java
index 78f0b16..75e4d86 100644
--- a/lucene/core/src/java/org/apache/lucene/search/SloppyPhraseScorer.java
+++ b/lucene/core/src/java/org/apache/lucene/search/SloppyPhraseScorer.java
@@ -516,8 +516,7 @@ final class SloppyPhraseScorer extends Scorer {
     return tg;
   }
 
-  @Override
-  public int freq() {
+  int freq() {
     return numMatches;
   }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/java/org/apache/lucene/search/SynonymQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/SynonymQuery.java b/lucene/core/src/java/org/apache/lucene/search/SynonymQuery.java
index bc077aa..4e4d69f 100644
--- a/lucene/core/src/java/org/apache/lucene/search/SynonymQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/SynonymQuery.java
@@ -171,7 +171,7 @@ public final class SynonymQuery extends Query {
             freq = synScorer.tf(synScorer.getSubMatches());
           } else {
             assert scorer instanceof TermScorer;
-            freq = scorer.freq();
+            freq = ((TermScorer)scorer).freq();
           }
           SimScorer docScorer = similarity.simScorer(simWeight, context);
           Explanation freqExplanation = Explanation.match(freq, "termFreq=" + freq);
@@ -238,7 +238,7 @@ public final class SynonymQuery extends Query {
     final int tf(DisiWrapper topList) throws IOException {
       int tf = 0;
       for (DisiWrapper w = topList; w != null; w = w.next) {
-        tf += w.scorer.freq();
+        tf += ((TermScorer)w.scorer).freq();
       }
       return tf;
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/java/org/apache/lucene/search/TermQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/TermQuery.java b/lucene/core/src/java/org/apache/lucene/search/TermQuery.java
index 2b1e420..5b3f1ad 100644
--- a/lucene/core/src/java/org/apache/lucene/search/TermQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/TermQuery.java
@@ -144,7 +144,7 @@ public class TermQuery extends Query {
 
     @Override
     public Explanation explain(LeafReaderContext context, int doc) throws IOException {
-      Scorer scorer = scorer(context);
+      TermScorer scorer = (TermScorer) scorer(context);
       if (scorer != null) {
         int newDoc = scorer.iterator().advance(doc);
         if (newDoc == doc) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/java/org/apache/lucene/search/TermScorer.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/TermScorer.java b/lucene/core/src/java/org/apache/lucene/search/TermScorer.java
index 6c823f1..c478a25 100644
--- a/lucene/core/src/java/org/apache/lucene/search/TermScorer.java
+++ b/lucene/core/src/java/org/apache/lucene/search/TermScorer.java
@@ -50,8 +50,7 @@ final class TermScorer extends Scorer {
     return postingsEnum.docID();
   }
 
-  @Override
-  public int freq() throws IOException {
+  final int freq() throws IOException {
     return postingsEnum.freq();
   }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/java/org/apache/lucene/search/package-info.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/package-info.java b/lucene/core/src/java/org/apache/lucene/search/package-info.java
index 2201be0..52b9411 100644
--- a/lucene/core/src/java/org/apache/lucene/search/package-info.java
+++ b/lucene/core/src/java/org/apache/lucene/search/package-info.java
@@ -405,12 +405,6 @@
  *                 {@link org.apache.lucene.search.similarities.Similarity.SimScorer#score(int, float) SimScorer.score(int doc, float freq)}.
  *             </li>
  *             <li>
- *                 {@link org.apache.lucene.search.Scorer#freq freq()} &mdash; Returns the number of matches
- *                 for the current document. This value can be determined in any appropriate way for an application. For instance, the
- *                 {@link org.apache.lucene.search.TermScorer TermScorer} simply defers to the term frequency from the inverted index:
- *                 {@link org.apache.lucene.index.PostingsEnum#freq PostingsEnum.freq()}.
- *             </li>
- *             <li>
  *                 {@link org.apache.lucene.search.Scorer#getChildren getChildren()} &mdash; Returns any child subscorers
  *                 underneath this scorer. This allows for users to navigate the scorer hierarchy and receive more fine-grained
  *                 details on the scoring process.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/java/org/apache/lucene/search/spans/SpanScorer.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/spans/SpanScorer.java b/lucene/core/src/java/org/apache/lucene/search/spans/SpanScorer.java
index 4a29ac1..699fa1b 100644
--- a/lucene/core/src/java/org/apache/lucene/search/spans/SpanScorer.java
+++ b/lucene/core/src/java/org/apache/lucene/search/spans/SpanScorer.java
@@ -134,12 +134,6 @@ public class SpanScorer extends Scorer {
     return scoreCurrentDoc();
   }
 
-  @Override
-  public final int freq() throws IOException {
-    ensureFreq();
-    return numMatches;
-  }
-
   /** Returns the intermediate "sloppy freq" adjusted for edit distance
    *  @lucene.internal */
   final float sloppyFreq() throws IOException {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/test/org/apache/lucene/search/JustCompileSearch.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/JustCompileSearch.java b/lucene/core/src/test/org/apache/lucene/search/JustCompileSearch.java
index 3bffc95..18dae47 100644
--- a/lucene/core/src/test/org/apache/lucene/search/JustCompileSearch.java
+++ b/lucene/core/src/test/org/apache/lucene/search/JustCompileSearch.java
@@ -176,11 +176,6 @@ final class JustCompileSearch {
     }
 
     @Override
-    public int freq() {
-      throw new UnsupportedOperationException(UNSUPPORTED_MSG);
-    }
-
-    @Override
     public int docID() {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/test/org/apache/lucene/search/TestBoolean2ScorerSupplier.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestBoolean2ScorerSupplier.java b/lucene/core/src/test/org/apache/lucene/search/TestBoolean2ScorerSupplier.java
index 60c9551..74e9dd5 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestBoolean2ScorerSupplier.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestBoolean2ScorerSupplier.java
@@ -51,11 +51,6 @@ public class TestBoolean2ScorerSupplier extends LuceneTestCase {
     }
 
     @Override
-    public int freq() throws IOException {
-      return 1;
-    }
-
-    @Override
     public DocIdSetIterator iterator() {
       return it;
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/test/org/apache/lucene/search/TestBooleanQueryVisitSubscorers.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestBooleanQueryVisitSubscorers.java b/lucene/core/src/test/org/apache/lucene/search/TestBooleanQueryVisitSubscorers.java
index bde3407..a0ffdae 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestBooleanQueryVisitSubscorers.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestBooleanQueryVisitSubscorers.java
@@ -30,6 +30,7 @@ import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field.Store;
 import org.apache.lucene.document.TextField;
+import org.apache.lucene.index.FieldInvertState;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.IndexWriterConfig;
 import org.apache.lucene.index.LeafReaderContext;
@@ -37,7 +38,9 @@ import org.apache.lucene.index.RandomIndexWriter;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.search.BooleanClause.Occur;
 import org.apache.lucene.search.Scorer.ChildScorer;
+import org.apache.lucene.search.similarities.BasicStats;
 import org.apache.lucene.search.similarities.ClassicSimilarity;
+import org.apache.lucene.search.similarities.Similarity;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.LuceneTestCase;
 
@@ -73,7 +76,7 @@ public class TestBooleanQueryVisitSubscorers extends LuceneTestCase {
     searcher = new IndexSearcher(reader);
     searcher.setSimilarity(new ClassicSimilarity());
     scorerSearcher = new ScorerIndexSearcher(reader);
-    scorerSearcher.setSimilarity(new ClassicSimilarity());
+    scorerSearcher.setSimilarity(new CountingSimilarity());
   }
   
   @Override
@@ -113,7 +116,7 @@ public class TestBooleanQueryVisitSubscorers extends LuceneTestCase {
     BooleanQuery.Builder bq = new BooleanQuery.Builder();
     bq.add(new TermQuery(new Term(F2, "lucene")), BooleanClause.Occur.MUST);
     bq.add(new TermQuery(new Term(F2, "is")), BooleanClause.Occur.MUST);
-    Map<Integer,Integer> tfs = getDocCounts(searcher, bq.build());
+    Map<Integer,Integer> tfs = getDocCounts(scorerSearcher, bq.build());
     assertEquals(3, tfs.size()); // 3 documents
     assertEquals(2, tfs.get(0).intValue()); // f2:lucene + f2:is
     assertEquals(3, tfs.get(1).intValue()); // f2:is + f2:is + f2:lucene
@@ -159,7 +162,7 @@ public class TestBooleanQueryVisitSubscorers extends LuceneTestCase {
           int freq = 0;
           for(Scorer scorer : tqsSet) {
             if (doc == scorer.docID()) {
-              freq += scorer.freq();
+              freq += scorer.score();
             }
           }
           docCounts.put(doc + docBase, freq);
@@ -317,4 +320,28 @@ public class TestBooleanQueryVisitSubscorers extends LuceneTestCase {
     }
   }
 
+  // Similarity that just returns the frequency as the score
+  private static class CountingSimilarity extends Similarity {
+
+    @Override
+    public long computeNorm(FieldInvertState state) {
+      return 1;
+    }
+
+    @Override
+    public SimWeight computeWeight(float boost, CollectionStatistics collectionStats, TermStatistics... termStats) {
+      return new BasicStats("", boost);
+    }
+
+    @Override
+    public SimScorer simScorer(SimWeight weight, LeafReaderContext context) throws IOException {
+      return new SimScorer() {
+        @Override
+        public float score(int doc, float freq) throws IOException {
+          return freq;
+        }
+      };
+    }
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/test/org/apache/lucene/search/TestCachingCollector.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestCachingCollector.java b/lucene/core/src/test/org/apache/lucene/search/TestCachingCollector.java
index 89304ba..29b6a9d 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestCachingCollector.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestCachingCollector.java
@@ -33,9 +33,6 @@ public class TestCachingCollector extends LuceneTestCase {
     
     @Override
     public float score() throws IOException { return 0; }
-    
-    @Override
-    public int freq() throws IOException { return 0; }
 
     @Override
     public int docID() { return 0; }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/test/org/apache/lucene/search/TestConjunctionDISI.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestConjunctionDISI.java b/lucene/core/src/test/org/apache/lucene/search/TestConjunctionDISI.java
index 9835f35..f11809a 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestConjunctionDISI.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestConjunctionDISI.java
@@ -146,11 +146,6 @@ public class TestConjunctionDISI extends LuceneTestCase {
         return 0;
       }
 
-      @Override
-      public int freq() throws IOException {
-        return 0;
-      }
-
     };
   }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/test/org/apache/lucene/search/TestMinShouldMatch2.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestMinShouldMatch2.java b/lucene/core/src/test/org/apache/lucene/search/TestMinShouldMatch2.java
index b2c21b3..4d690ce 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestMinShouldMatch2.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestMinShouldMatch2.java
@@ -150,7 +150,6 @@ public class TestMinShouldMatch2 extends LuceneTestCase {
     DocIdSetIterator actualIt = actual.iterator();
     while ((doc = expectedIt.nextDoc()) != DocIdSetIterator.NO_MORE_DOCS) {
       assertEquals(doc, actualIt.nextDoc());
-      assertEquals(expected.freq(), actual.freq());
       float expectedScore = expected.score();
       float actualScore = actual.score();
       assertEquals(expectedScore, actualScore, CheckHits.explainToleranceDelta(expectedScore, actualScore));
@@ -169,7 +168,6 @@ public class TestMinShouldMatch2 extends LuceneTestCase {
     int doc;
     while ((doc = expectedIt.advance(prevDoc+amount)) != DocIdSetIterator.NO_MORE_DOCS) {
       assertEquals(doc, actualIt.advance(prevDoc+amount));
-      assertEquals(expected.freq(), actual.freq());
       float expectedScore = expected.score();
       float actualScore = actual.score();
       assertEquals(expectedScore, actualScore, CheckHits.explainToleranceDelta(expectedScore, actualScore));
@@ -348,11 +346,6 @@ public class TestMinShouldMatch2 extends LuceneTestCase {
     }
 
     @Override
-    public int freq() throws IOException {
-      return currentMatched;
-    }
-
-    @Override
     public int docID() {
       return currentDoc;
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/test/org/apache/lucene/search/TestPositiveScoresOnlyCollector.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestPositiveScoresOnlyCollector.java b/lucene/core/src/test/org/apache/lucene/search/TestPositiveScoresOnlyCollector.java
index 0043b3d..44aa829 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestPositiveScoresOnlyCollector.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestPositiveScoresOnlyCollector.java
@@ -36,10 +36,6 @@ public class TestPositiveScoresOnlyCollector extends LuceneTestCase {
     @Override public float score() {
       return idx == scores.length ? Float.NaN : scores[idx];
     }
-    
-    @Override public int freq() {
-      return 1;
-    }
 
     @Override public int docID() { return idx; }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/test/org/apache/lucene/search/TestQueryRescorer.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestQueryRescorer.java b/lucene/core/src/test/org/apache/lucene/search/TestQueryRescorer.java
index fab876e..239bce2 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestQueryRescorer.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestQueryRescorer.java
@@ -438,11 +438,6 @@ public class TestQueryRescorer extends LuceneTestCase {
             }
 
             @Override
-            public int freq() {
-              return 1;
-            }
-
-            @Override
             public DocIdSetIterator iterator() {
               return new DocIdSetIterator() {
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/test/org/apache/lucene/search/TestScoreCachingWrappingScorer.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestScoreCachingWrappingScorer.java b/lucene/core/src/test/org/apache/lucene/search/TestScoreCachingWrappingScorer.java
index 2725603..a61fac8 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestScoreCachingWrappingScorer.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestScoreCachingWrappingScorer.java
@@ -42,10 +42,6 @@ public class TestScoreCachingWrappingScorer extends LuceneTestCase {
       // once per document.
       return idx == scores.length ? Float.NaN : scores[idx++];
     }
-    
-    @Override public int freq() throws IOException {
-      return 1;
-    }
 
     @Override public int docID() { return doc; }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/test/org/apache/lucene/search/TestSloppyPhraseQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestSloppyPhraseQuery.java b/lucene/core/src/test/org/apache/lucene/search/TestSloppyPhraseQuery.java
index 094278b..ee36d3b 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestSloppyPhraseQuery.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestSloppyPhraseQuery.java
@@ -187,12 +187,18 @@ public class TestSloppyPhraseQuery extends LuceneTestCase {
     @Override
     public void setScorer(Scorer scorer) throws IOException {
       this.scorer = scorer;
+      while (this.scorer instanceof AssertingScorer) {
+        this.scorer = ((AssertingScorer)this.scorer).getIn();
+      }
     }
 
     @Override
     public void collect(int doc) throws IOException {
       totalHits++;
-      max = Math.max(max, scorer.freq());
+      if (scorer instanceof SloppyPhraseScorer)
+        max = Math.max(max, ((SloppyPhraseScorer)scorer).freq());
+      else
+        max = Math.max(max, ((ExactPhraseScorer)scorer).freq());
     }
     
     @Override
@@ -209,11 +215,14 @@ public class TestSloppyPhraseQuery extends LuceneTestCase {
       @Override
       public void setScorer(Scorer scorer) {
         this.scorer = scorer;
+        while (this.scorer instanceof AssertingScorer) {
+          this.scorer = ((AssertingScorer)this.scorer).getIn();
+        }
       }
       
       @Override
       public void collect(int doc) throws IOException {
-        assertFalse(Float.isInfinite(scorer.freq()));
+        assertFalse(Float.isInfinite(((SloppyPhraseScorer)scorer).freq()));
         assertFalse(Float.isInfinite(scorer.score()));
       }
       

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/test/org/apache/lucene/search/TestSubScorerFreqs.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestSubScorerFreqs.java b/lucene/core/src/test/org/apache/lucene/search/TestSubScorerFreqs.java
index 7b713b9..03b90d2 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestSubScorerFreqs.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestSubScorerFreqs.java
@@ -17,16 +17,28 @@
 package org.apache.lucene.search;
 
 
-import java.io.*;
-import java.util.*;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
 
 import org.apache.lucene.analysis.MockAnalyzer;
-import org.apache.lucene.document.*;
-import org.apache.lucene.index.*;
+import org.apache.lucene.document.Document;
+import org.apache.lucene.document.Field;
+import org.apache.lucene.index.FieldInvertState;
+import org.apache.lucene.index.LeafReaderContext;
+import org.apache.lucene.index.RandomIndexWriter;
+import org.apache.lucene.index.Term;
 import org.apache.lucene.search.BooleanClause.Occur;
 import org.apache.lucene.search.Scorer.ChildScorer;
-import org.apache.lucene.store.*;
-import org.apache.lucene.util.*;
+import org.apache.lucene.search.similarities.BasicStats;
+import org.apache.lucene.search.similarities.Similarity;
+import org.apache.lucene.store.Directory;
+import org.apache.lucene.store.RAMDirectory;
+import org.apache.lucene.util.LuceneTestCase;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -54,6 +66,7 @@ public class TestSubScorerFreqs extends LuceneTestCase {
     }
 
     s = newSearcher(w.getReader());
+    s.setSimilarity(new CountingSimilarity());
     w.close();
   }
 
@@ -100,7 +113,7 @@ public class TestSubScorerFreqs extends LuceneTestCase {
           for (Map.Entry<Query, Scorer> ent : subScorers.entrySet()) {
             Scorer value = ent.getValue();
             int matchId = value.docID();
-            freqs.put(ent.getKey(), matchId == doc ? value.freq() : 0.0f);
+            freqs.put(ent.getKey(), matchId == doc ? value.score() : 0.0f);
           }
           docCounts.put(doc + docBase, freqs);
           super.collect(doc);
@@ -208,4 +221,28 @@ public class TestSubScorerFreqs extends LuceneTestCase {
     }
 
   }
+
+  // Similarity that just returns the frequency as the score
+  private static class CountingSimilarity extends Similarity {
+
+    @Override
+    public long computeNorm(FieldInvertState state) {
+      return 1;
+    }
+
+    @Override
+    public SimWeight computeWeight(float boost, CollectionStatistics collectionStats, TermStatistics... termStats) {
+      return new BasicStats("", boost);
+    }
+
+    @Override
+    public SimScorer simScorer(SimWeight weight, LeafReaderContext context) throws IOException {
+      return new SimScorer() {
+        @Override
+        public float score(int doc, float freq) throws IOException {
+          return freq;
+        }
+      };
+    }
+  }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/core/src/test/org/apache/lucene/search/TestTopFieldCollector.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestTopFieldCollector.java b/lucene/core/src/test/org/apache/lucene/search/TestTopFieldCollector.java
index 4f5573d..d91f4ac 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestTopFieldCollector.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestTopFieldCollector.java
@@ -226,11 +226,6 @@ public class TestTopFieldCollector extends LuceneTestCase {
                     }
 
                     @Override
-                    public int freq() throws IOException {
-                      return scorer.freq();
-                    }
-
-                    @Override
                     public int docID() {
                       return scorer.docID();
                     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/expressions/src/java/org/apache/lucene/expressions/FakeScorer.java
----------------------------------------------------------------------
diff --git a/lucene/expressions/src/java/org/apache/lucene/expressions/FakeScorer.java b/lucene/expressions/src/java/org/apache/lucene/expressions/FakeScorer.java
index c78951c..cda8322 100644
--- a/lucene/expressions/src/java/org/apache/lucene/expressions/FakeScorer.java
+++ b/lucene/expressions/src/java/org/apache/lucene/expressions/FakeScorer.java
@@ -26,7 +26,6 @@ class FakeScorer extends Scorer {
 
   float score;
   int doc = -1;
-  int freq = 1;
 
   FakeScorer() {
     super(null);
@@ -43,11 +42,6 @@ class FakeScorer extends Scorer {
   }
 
   @Override
-  public int freq() throws IOException {
-    return freq;
-  }
-
-  @Override
   public float score() throws IOException {
     return score;
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/facet/src/java/org/apache/lucene/facet/DrillSidewaysScorer.java
----------------------------------------------------------------------
diff --git a/lucene/facet/src/java/org/apache/lucene/facet/DrillSidewaysScorer.java b/lucene/facet/src/java/org/apache/lucene/facet/DrillSidewaysScorer.java
index 42da30a..1b36f19 100644
--- a/lucene/facet/src/java/org/apache/lucene/facet/DrillSidewaysScorer.java
+++ b/lucene/facet/src/java/org/apache/lucene/facet/DrillSidewaysScorer.java
@@ -592,11 +592,6 @@ class DrillSidewaysScorer extends BulkScorer {
     }
 
     @Override
-    public int freq() {
-      return 1+dims.length;
-    }
-
-    @Override
     public DocIdSetIterator iterator() {
       throw new UnsupportedOperationException("FakeScorer doesn't support nextDoc()");
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/grouping/src/java/org/apache/lucene/search/grouping/FakeScorer.java
----------------------------------------------------------------------
diff --git a/lucene/grouping/src/java/org/apache/lucene/search/grouping/FakeScorer.java b/lucene/grouping/src/java/org/apache/lucene/search/grouping/FakeScorer.java
index b74296b..ecf3091 100644
--- a/lucene/grouping/src/java/org/apache/lucene/search/grouping/FakeScorer.java
+++ b/lucene/grouping/src/java/org/apache/lucene/search/grouping/FakeScorer.java
@@ -25,7 +25,6 @@ class FakeScorer extends Scorer {
 
   float score;
   int doc = -1;
-  int freq = 1;
 
   FakeScorer() {
     super(null);
@@ -42,11 +41,6 @@ class FakeScorer extends Scorer {
   }
 
   @Override
-  public int freq() throws IOException {
-    return freq;
-  }
-
-  @Override
   public float score() throws IOException {
     return score;
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/join/src/java/org/apache/lucene/search/join/BaseGlobalOrdinalScorer.java
----------------------------------------------------------------------
diff --git a/lucene/join/src/java/org/apache/lucene/search/join/BaseGlobalOrdinalScorer.java b/lucene/join/src/java/org/apache/lucene/search/join/BaseGlobalOrdinalScorer.java
index e034369..c3f3255 100644
--- a/lucene/join/src/java/org/apache/lucene/search/join/BaseGlobalOrdinalScorer.java
+++ b/lucene/join/src/java/org/apache/lucene/search/join/BaseGlobalOrdinalScorer.java
@@ -57,11 +57,6 @@ abstract class BaseGlobalOrdinalScorer extends Scorer {
     return createTwoPhaseIterator(approximation);
   }
 
-  @Override
-  public int freq() throws IOException {
-    return 1;
-  }
-
   protected abstract TwoPhaseIterator createTwoPhaseIterator(DocIdSetIterator approximation);
 
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/join/src/java/org/apache/lucene/search/join/FakeScorer.java
----------------------------------------------------------------------
diff --git a/lucene/join/src/java/org/apache/lucene/search/join/FakeScorer.java b/lucene/join/src/java/org/apache/lucene/search/join/FakeScorer.java
index a88b12f..6ebca86 100644
--- a/lucene/join/src/java/org/apache/lucene/search/join/FakeScorer.java
+++ b/lucene/join/src/java/org/apache/lucene/search/join/FakeScorer.java
@@ -25,7 +25,6 @@ class FakeScorer extends Scorer {
 
   float score;
   int doc = -1;
-  int freq = 1;
 
   FakeScorer() {
     super(null);
@@ -42,11 +41,6 @@ class FakeScorer extends Scorer {
   }
 
   @Override
-  public int freq() throws IOException {
-    return freq;
-  }
-
-  @Override
   public float score() throws IOException {
     return score;
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/join/src/java/org/apache/lucene/search/join/ParentChildrenBlockJoinQuery.java
----------------------------------------------------------------------
diff --git a/lucene/join/src/java/org/apache/lucene/search/join/ParentChildrenBlockJoinQuery.java b/lucene/join/src/java/org/apache/lucene/search/join/ParentChildrenBlockJoinQuery.java
index 50e012a..1040f08 100644
--- a/lucene/join/src/java/org/apache/lucene/search/join/ParentChildrenBlockJoinQuery.java
+++ b/lucene/join/src/java/org/apache/lucene/search/join/ParentChildrenBlockJoinQuery.java
@@ -184,11 +184,6 @@ public class ParentChildrenBlockJoinQuery extends Query {
           }
 
           @Override
-          public int freq() throws IOException {
-            return childrenScorer.freq();
-          }
-
-          @Override
           public DocIdSetIterator iterator() {
             return it;
           }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/join/src/java/org/apache/lucene/search/join/PointInSetIncludingScoreQuery.java
----------------------------------------------------------------------
diff --git a/lucene/join/src/java/org/apache/lucene/search/join/PointInSetIncludingScoreQuery.java b/lucene/join/src/java/org/apache/lucene/search/join/PointInSetIncludingScoreQuery.java
index 6eb1b1d..a7f6099 100644
--- a/lucene/join/src/java/org/apache/lucene/search/join/PointInSetIncludingScoreQuery.java
+++ b/lucene/join/src/java/org/apache/lucene/search/join/PointInSetIncludingScoreQuery.java
@@ -170,11 +170,6 @@ abstract class PointInSetIncludingScoreQuery extends Query {
           }
 
           @Override
-          public int freq() throws IOException {
-            return 1;
-          }
-
-          @Override
           public int docID() {
             return disi.docID();
           }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/join/src/java/org/apache/lucene/search/join/TermsIncludingScoreQuery.java
----------------------------------------------------------------------
diff --git a/lucene/join/src/java/org/apache/lucene/search/join/TermsIncludingScoreQuery.java b/lucene/join/src/java/org/apache/lucene/search/join/TermsIncludingScoreQuery.java
index 67985d6..6932e85 100644
--- a/lucene/join/src/java/org/apache/lucene/search/join/TermsIncludingScoreQuery.java
+++ b/lucene/join/src/java/org/apache/lucene/search/join/TermsIncludingScoreQuery.java
@@ -186,11 +186,6 @@ class TermsIncludingScoreQuery extends Query {
     }
 
     @Override
-    public int freq() throws IOException {
-      return 1;
-    }
-
-    @Override
     public int docID() {
       return matchingDocsIterator.docID();
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/join/src/java/org/apache/lucene/search/join/ToChildBlockJoinQuery.java
----------------------------------------------------------------------
diff --git a/lucene/join/src/java/org/apache/lucene/search/join/ToChildBlockJoinQuery.java b/lucene/join/src/java/org/apache/lucene/search/join/ToChildBlockJoinQuery.java
index 50003cc..7048b69 100644
--- a/lucene/join/src/java/org/apache/lucene/search/join/ToChildBlockJoinQuery.java
+++ b/lucene/join/src/java/org/apache/lucene/search/join/ToChildBlockJoinQuery.java
@@ -129,7 +129,6 @@ public class ToChildBlockJoinQuery extends Query {
     private final boolean doScores;
 
     private float parentScore;
-    private int parentFreq = 1;
 
     private int childDoc = -1;
     private int parentDoc = 0;
@@ -199,7 +198,6 @@ public class ToChildBlockJoinQuery extends Query {
                 if (childDoc < parentDoc) {
                   if (doScores) {
                     parentScore = parentScorer.score();
-                    parentFreq = parentScorer.freq();
                   }
                   //System.out.println("  " + childDoc);
                   return childDoc;
@@ -247,7 +245,6 @@ public class ToChildBlockJoinQuery extends Query {
 
             if (doScores) {
               parentScore = parentScorer.score();
-              parentFreq = parentScorer.freq();
             }
           }
 
@@ -282,11 +279,6 @@ public class ToChildBlockJoinQuery extends Query {
     public float score() throws IOException {
       return parentScore;
     }
-
-    @Override
-    public int freq() throws IOException {
-      return parentFreq;
-    }
     
     int getParentDoc() {
       return parentDoc;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinQuery.java
----------------------------------------------------------------------
diff --git a/lucene/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinQuery.java b/lucene/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinQuery.java
index 05a1186..c271ef8 100644
--- a/lucene/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinQuery.java
+++ b/lucene/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinQuery.java
@@ -236,7 +236,6 @@ public class ToParentBlockJoinQuery extends Query {
     private final ParentApproximation parentApproximation;
     private final ParentTwoPhase parentTwoPhase;
     private float score;
-    private int freq;
 
     public BlockJoinScorer(Weight weight, Scorer childScorer, BitSet parentBits, ScoreMode scoreMode) {
       super(weight);
@@ -286,12 +285,6 @@ public class ToParentBlockJoinQuery extends Query {
       setScoreAndFreq();
       return score;
     }
-    
-    @Override
-    public int freq() throws IOException {
-      setScoreAndFreq();
-      return freq;
-    }
 
     private void setScoreAndFreq() throws IOException {
       if (childApproximation.docID() >= parentApproximation.docID()) {
@@ -330,7 +323,6 @@ public class ToParentBlockJoinQuery extends Query {
         score /= freq;
       }
       this.score = (float) score;
-      this.freq = freq;
     }
 
     public Explanation explain(LeafReaderContext context, Weight childWeight) throws IOException {
@@ -350,7 +342,6 @@ public class ToParentBlockJoinQuery extends Query {
         }
       }
 
-      assert freq() == matches;
       return Explanation.match(score(), String.format(Locale.ROOT,
           "Score based on %d child docs in range from %d to %d, best match:", matches, start, end), bestChild
       );

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/queries/src/java/org/apache/lucene/queries/function/FunctionQuery.java
----------------------------------------------------------------------
diff --git a/lucene/queries/src/java/org/apache/lucene/queries/function/FunctionQuery.java b/lucene/queries/src/java/org/apache/lucene/queries/function/FunctionQuery.java
index 4f0b1b7..3123845 100644
--- a/lucene/queries/src/java/org/apache/lucene/queries/function/FunctionQuery.java
+++ b/lucene/queries/src/java/org/apache/lucene/queries/function/FunctionQuery.java
@@ -123,11 +123,6 @@ public class FunctionQuery extends Query {
       return score>Float.NEGATIVE_INFINITY ? score : -Float.MAX_VALUE;
     }
 
-    @Override
-    public int freq() throws IOException {
-      return 1;
-    }
-
     public Explanation explain(int doc) throws IOException {
       float sc = boost * vals.floatVal(doc);
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/queries/src/java/org/apache/lucene/queries/function/ValueSource.java
----------------------------------------------------------------------
diff --git a/lucene/queries/src/java/org/apache/lucene/queries/function/ValueSource.java b/lucene/queries/src/java/org/apache/lucene/queries/function/ValueSource.java
index db5e695..fcaaed6 100644
--- a/lucene/queries/src/java/org/apache/lucene/queries/function/ValueSource.java
+++ b/lucene/queries/src/java/org/apache/lucene/queries/function/ValueSource.java
@@ -107,11 +107,6 @@ public abstract class ValueSource {
     }
 
     @Override
-    public int freq() throws IOException {
-      throw new UnsupportedOperationException();
-    }
-
-    @Override
     public DocIdSetIterator iterator() {
       throw new UnsupportedOperationException();
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/queries/src/java/org/apache/lucene/queries/function/ValueSourceScorer.java
----------------------------------------------------------------------
diff --git a/lucene/queries/src/java/org/apache/lucene/queries/function/ValueSourceScorer.java b/lucene/queries/src/java/org/apache/lucene/queries/function/ValueSourceScorer.java
index c9303cd..a9a5bf3 100644
--- a/lucene/queries/src/java/org/apache/lucene/queries/function/ValueSourceScorer.java
+++ b/lucene/queries/src/java/org/apache/lucene/queries/function/ValueSourceScorer.java
@@ -89,9 +89,4 @@ public abstract class ValueSourceScorer extends Scorer {
     return score > Float.NEGATIVE_INFINITY ? score : -Float.MAX_VALUE;
   }
 
-  @Override
-  public int freq() throws IOException {
-    return 1;
-  }
-
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/queries/src/java/org/apache/lucene/queries/payloads/PayloadScoreQuery.java
----------------------------------------------------------------------
diff --git a/lucene/queries/src/java/org/apache/lucene/queries/payloads/PayloadScoreQuery.java b/lucene/queries/src/java/org/apache/lucene/queries/payloads/PayloadScoreQuery.java
index 88ac4fc..17e8901 100644
--- a/lucene/queries/src/java/org/apache/lucene/queries/payloads/PayloadScoreQuery.java
+++ b/lucene/queries/src/java/org/apache/lucene/queries/payloads/PayloadScoreQuery.java
@@ -170,7 +170,7 @@ public class PayloadScoreQuery extends SpanQuery {
       if (scorer == null || scorer.iterator().advance(doc) != doc)
         return Explanation.noMatch("No match");
 
-      scorer.freq();  // force freq calculation
+      scorer.score();  // force freq calculation
       Explanation payloadExpl = scorer.getPayloadExplanation();
 
       if (includeSpanScore) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/sandbox/src/java/org/apache/lucene/search/CoveringScorer.java
----------------------------------------------------------------------
diff --git a/lucene/sandbox/src/java/org/apache/lucene/search/CoveringScorer.java b/lucene/sandbox/src/java/org/apache/lucene/search/CoveringScorer.java
index 8f62d23..f5ac328 100644
--- a/lucene/sandbox/src/java/org/apache/lucene/search/CoveringScorer.java
+++ b/lucene/sandbox/src/java/org/apache/lucene/search/CoveringScorer.java
@@ -201,12 +201,6 @@ final class CoveringScorer extends Scorer {
   }
 
   @Override
-  public int freq() throws IOException {
-    setTopListAndFreqIfNecessary();
-    return freq;
-  }
-
-  @Override
   public float score() throws IOException {
     // we need to know about all matches
     setTopListAndFreqIfNecessary();

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/sandbox/src/java/org/apache/lucene/search/TermAutomatonScorer.java
----------------------------------------------------------------------
diff --git a/lucene/sandbox/src/java/org/apache/lucene/search/TermAutomatonScorer.java b/lucene/sandbox/src/java/org/apache/lucene/search/TermAutomatonScorer.java
index 7769712..d5ac6ff 100644
--- a/lucene/sandbox/src/java/org/apache/lucene/search/TermAutomatonScorer.java
+++ b/lucene/sandbox/src/java/org/apache/lucene/search/TermAutomatonScorer.java
@@ -350,11 +350,6 @@ class TermAutomatonScorer extends Scorer {
   }
 
   @Override
-  public int freq() {
-    return freq;
-  }
-
-  @Override
   public int docID() {
     return docID;
   }
@@ -365,6 +360,11 @@ class TermAutomatonScorer extends Scorer {
     return docScorer.score(docID, freq);
   }
 
+  // for tests
+  final int freq() {
+    return freq;
+  }
+
   static class TermRunAutomaton extends RunAutomaton {
     public TermRunAutomaton(Automaton a, int termCount) {
       super(a, termCount);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/sandbox/src/test/org/apache/lucene/search/TestTermAutomatonQuery.java
----------------------------------------------------------------------
diff --git a/lucene/sandbox/src/test/org/apache/lucene/search/TestTermAutomatonQuery.java b/lucene/sandbox/src/test/org/apache/lucene/search/TestTermAutomatonQuery.java
index ae18245..aaccbfc 100644
--- a/lucene/sandbox/src/test/org/apache/lucene/search/TestTermAutomatonQuery.java
+++ b/lucene/sandbox/src/test/org/apache/lucene/search/TestTermAutomatonQuery.java
@@ -262,59 +262,6 @@ public class TestTermAutomatonQuery extends LuceneTestCase {
     dir.close();
   }
 
-  public void testFreq() throws Exception {
-    Directory dir = newDirectory();
-    RandomIndexWriter w = new RandomIndexWriter(random(), dir);
-    Document doc = new Document();
-    // matches freq == 3
-    doc.add(newTextField("field", "here comes the sun foo bar here comes another sun here comes shiny sun", Field.Store.NO));
-    w.addDocument(doc);
-
-    doc = new Document();
-    // doesn't match
-    doc.add(newTextField("field", "here comes the other sun", Field.Store.NO));
-    w.addDocument(doc);
-    IndexReader r = w.getReader();
-    IndexSearcher s = newSearcher(r);
-
-    TermAutomatonQuery q = new TermAutomatonQuery("field");
-    int init = q.createState();
-    int s1 = q.createState();
-    q.addTransition(init, s1, "comes");
-    int s2 = q.createState();
-    q.addAnyTransition(s1, s2);
-    int s3 = q.createState();
-    q.setAccept(s3, true);
-    q.addTransition(s2, s3, "sun");
-    q.finish();
-
-    s.search(q, new SimpleCollector() {
-        private Scorer scorer;
-
-        @Override
-        public void setScorer(Scorer scorer) {
-          this.scorer = scorer;
-          while (scorer instanceof AssertingScorer) {
-            scorer = ((AssertingScorer) scorer).getIn();
-          }
-        }
-
-        @Override
-        public void collect(int docID) throws IOException {
-          assertEquals(3, scorer.freq());
-        }
-        
-        @Override
-        public boolean needsScores() {
-          return true;
-        }
-      });
-
-    w.close();
-    r.close();
-    dir.close();
-  }
-
   public void testSegsMissingTerms() throws Exception {
     Directory dir = newDirectory();
     RandomIndexWriter w = new RandomIndexWriter(random(), dir);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/test-framework/src/java/org/apache/lucene/search/AssertingScorer.java
----------------------------------------------------------------------
diff --git a/lucene/test-framework/src/java/org/apache/lucene/search/AssertingScorer.java b/lucene/test-framework/src/java/org/apache/lucene/search/AssertingScorer.java
index 1aad140..d0774bf 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/search/AssertingScorer.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/search/AssertingScorer.java
@@ -82,13 +82,6 @@ public class AssertingScorer extends Scorer {
   }
 
   @Override
-  public int freq() throws IOException {
-    assert needsScores;
-    assert iterating();
-    return in.freq();
-  }
-
-  @Override
   public int docID() {
     return in.docID();
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/test-framework/src/java/org/apache/lucene/search/BulkScorerWrapperScorer.java
----------------------------------------------------------------------
diff --git a/lucene/test-framework/src/java/org/apache/lucene/search/BulkScorerWrapperScorer.java b/lucene/test-framework/src/java/org/apache/lucene/search/BulkScorerWrapperScorer.java
index 91ec9bb..db11318 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/search/BulkScorerWrapperScorer.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/search/BulkScorerWrapperScorer.java
@@ -31,7 +31,6 @@ public class BulkScorerWrapperScorer extends Scorer {
   private int next = 0;
 
   private final int[] docs;
-  private final int[] freqs;
   private final float[] scores;
   private int bufferLength;
 
@@ -40,7 +39,6 @@ public class BulkScorerWrapperScorer extends Scorer {
     super(weight);
     this.scorer = scorer;
     docs = new int[bufferSize];
-    freqs = new int[bufferSize];
     scores = new float[bufferSize];
   }
 
@@ -58,7 +56,6 @@ public class BulkScorerWrapperScorer extends Scorer {
         @Override
         public void collect(int doc) throws IOException {
           docs[bufferLength] = doc;
-          freqs[bufferLength] = scorer.freq();
           scores[bufferLength] = scorer.score();
           bufferLength += 1;
         }
@@ -73,11 +70,6 @@ public class BulkScorerWrapperScorer extends Scorer {
   }
 
   @Override
-  public int freq() throws IOException {
-    return freqs[i];
-  }
-
-  @Override
   public int docID() {
     return doc;
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/lucene/test-framework/src/java/org/apache/lucene/search/RandomApproximationQuery.java
----------------------------------------------------------------------
diff --git a/lucene/test-framework/src/java/org/apache/lucene/search/RandomApproximationQuery.java b/lucene/test-framework/src/java/org/apache/lucene/search/RandomApproximationQuery.java
index 5c2873c..019c0c4 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/search/RandomApproximationQuery.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/search/RandomApproximationQuery.java
@@ -109,11 +109,6 @@ public class RandomApproximationQuery extends Query {
     }
 
     @Override
-    public int freq() throws IOException {
-      return scorer.freq();
-    }
-
-    @Override
     public int docID() {
       return scorer.docID();
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/solr/contrib/ltr/src/java/org/apache/solr/ltr/LTRScoringQuery.java
----------------------------------------------------------------------
diff --git a/solr/contrib/ltr/src/java/org/apache/solr/ltr/LTRScoringQuery.java b/solr/contrib/ltr/src/java/org/apache/solr/ltr/LTRScoringQuery.java
index 00401786..e4acb64 100644
--- a/solr/contrib/ltr/src/java/org/apache/solr/ltr/LTRScoringQuery.java
+++ b/solr/contrib/ltr/src/java/org/apache/solr/ltr/LTRScoringQuery.java
@@ -522,11 +522,6 @@ public class LTRScoringQuery extends Query {
       }
 
       @Override
-      public int freq() throws IOException {
-        return featureTraversalScorer.freq();
-      }
-
-      @Override
       public DocIdSetIterator iterator() {
         return featureTraversalScorer.iterator();
       }
@@ -581,16 +576,6 @@ public class LTRScoringQuery extends Query {
         }
 
         @Override
-        public int freq() throws IOException {
-          final DisiWrapper subMatches = subScorers.topList();
-          int freq = 1;
-          for (DisiWrapper w = subMatches.next; w != null; w = w.next) {
-            freq += 1;
-          }
-          return freq;
-        }
-
-        @Override
         public DocIdSetIterator iterator() {
           return itr;
         }
@@ -682,11 +667,6 @@ public class LTRScoringQuery extends Query {
         }
 
         @Override
-        public int freq() throws IOException {
-          return freq;
-        }
-
-        @Override
         public DocIdSetIterator iterator() {
           return new DenseIterator();
         }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/solr/contrib/ltr/src/java/org/apache/solr/ltr/feature/Feature.java
----------------------------------------------------------------------
diff --git a/solr/contrib/ltr/src/java/org/apache/solr/ltr/feature/Feature.java b/solr/contrib/ltr/src/java/org/apache/solr/ltr/feature/Feature.java
index f2396e1..082db06 100644
--- a/solr/contrib/ltr/src/java/org/apache/solr/ltr/feature/Feature.java
+++ b/solr/contrib/ltr/src/java/org/apache/solr/ltr/feature/Feature.java
@@ -298,11 +298,6 @@ public abstract class Feature extends Query {
       }
 
       @Override
-      public int freq() throws IOException {
-        throw new UnsupportedOperationException();
-      }
-
-      @Override
       public int docID() {
         return itr.docID();
       }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/solr/contrib/ltr/src/java/org/apache/solr/ltr/feature/OriginalScoreFeature.java
----------------------------------------------------------------------
diff --git a/solr/contrib/ltr/src/java/org/apache/solr/ltr/feature/OriginalScoreFeature.java b/solr/contrib/ltr/src/java/org/apache/solr/ltr/feature/OriginalScoreFeature.java
index 85fb8fd..c960453 100644
--- a/solr/contrib/ltr/src/java/org/apache/solr/ltr/feature/OriginalScoreFeature.java
+++ b/solr/contrib/ltr/src/java/org/apache/solr/ltr/feature/OriginalScoreFeature.java
@@ -108,11 +108,6 @@ public class OriginalScoreFeature extends Feature {
       }
 
       @Override
-      public int freq() throws IOException {
-        return originalScorer.freq();
-      }
-
-      @Override
       public int docID() {
         return originalScorer.docID();
       }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java b/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
index 3d2a4ed..f27b386 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
@@ -1481,11 +1481,6 @@ public class QueryComponent extends SearchComponent
     }
 
     @Override
-    public int freq() throws IOException {
-      throw new UnsupportedOperationException();
-    }
-
-    @Override
     public DocIdSetIterator iterator() {
       throw new UnsupportedOperationException();
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/solr/core/src/java/org/apache/solr/schema/LatLonType.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/schema/LatLonType.java b/solr/core/src/java/org/apache/solr/schema/LatLonType.java
index 7d64a15..259baa7 100644
--- a/solr/core/src/java/org/apache/solr/schema/LatLonType.java
+++ b/solr/core/src/java/org/apache/solr/schema/LatLonType.java
@@ -484,11 +484,6 @@ class SpatialDistanceQuery extends ExtendedQueryBase implements PostFilter {
       return (float)(dist * qWeight);
     }
 
-    @Override
-    public int freq() throws IOException {
-      return 1;
-    }
-
     public Explanation explain(Explanation base, int doc) throws IOException {
       if (base.isMatch() == false) {
         return base;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/solr/core/src/java/org/apache/solr/search/join/GraphQuery.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/join/GraphQuery.java b/solr/core/src/java/org/apache/solr/search/join/GraphQuery.java
index 00276aa..1d10a04 100644
--- a/solr/core/src/java/org/apache/solr/search/join/GraphQuery.java
+++ b/solr/core/src/java/org/apache/solr/search/join/GraphQuery.java
@@ -315,11 +315,7 @@ public class GraphQuery extends Query {
       // current position of the doc iterator.
       return iter.docID();
     }
-    
-    @Override
-    public int freq() throws IOException {
-      return 1;
-    }
+
   }
   
   /**

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/183571c0/solr/core/src/test/org/apache/solr/search/TestRankQueryPlugin.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/search/TestRankQueryPlugin.java b/solr/core/src/test/org/apache/solr/search/TestRankQueryPlugin.java
index a526621..67a71ee 100644
--- a/solr/core/src/test/org/apache/solr/search/TestRankQueryPlugin.java
+++ b/solr/core/src/test/org/apache/solr/search/TestRankQueryPlugin.java
@@ -457,11 +457,6 @@ public class TestRankQueryPlugin extends QParserPlugin {
       }
 
       @Override
-      public int freq() throws IOException {
-        throw new UnsupportedOperationException();
-      }
-
-      @Override
       public DocIdSetIterator iterator() {
         throw new UnsupportedOperationException();
       }


Mime
View raw message