You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by jp...@apache.org on 2016/07/12 12:41:18 UTC

[1/5] lucene-solr:master: LUCENE-7368: Remove queryNorm.

Repository: lucene-solr
Updated Branches:
  refs/heads/master 7b4af27aa -> 5def78ba1


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/solr/core/src/test/org/apache/solr/search/mlt/CloudMLTQParserTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/search/mlt/CloudMLTQParserTest.java b/solr/core/src/test/org/apache/solr/search/mlt/CloudMLTQParserTest.java
index 7956853..ffcde2f 100644
--- a/solr/core/src/test/org/apache/solr/search/mlt/CloudMLTQParserTest.java
+++ b/solr/core/src/test/org/apache/solr/search/mlt/CloudMLTQParserTest.java
@@ -98,7 +98,7 @@ public class CloudMLTQParserTest extends SolrCloudTestCase {
     QueryResponse queryResponse = cluster.getSolrClient()
         .query(COLLECTION, new SolrQuery("{!mlt qf=lowerfilt_u}17").setShowDebugInfo(true));
     SolrDocumentList solrDocuments = queryResponse.getResults();
-    int[] expectedIds = new int[]{7, 13, 14, 15, 16, 20, 22, 24, 32, 9};
+    int[] expectedIds = new int[]{7, 9, 13, 14, 15, 16, 20, 22, 24, 32};
     int[] actualIds = new int[10];
     int i = 0;
     for (SolrDocument solrDocument : solrDocuments) {
@@ -113,7 +113,7 @@ public class CloudMLTQParserTest extends SolrCloudTestCase {
 
     QueryResponse queryResponse = cluster.getSolrClient().query(COLLECTION, new SolrQuery("{!mlt qf=lowerfilt_u boost=true}17"));
     SolrDocumentList solrDocuments = queryResponse.getResults();
-    int[] expectedIds = new int[]{7, 13, 14, 15, 16, 20, 22, 24, 32, 9};
+    int[] expectedIds = new int[]{7, 9, 13, 14, 15, 16, 20, 22, 24, 32};
     int[] actualIds = new int[solrDocuments.size()];
     int i = 0;
     for (SolrDocument solrDocument : solrDocuments) {
@@ -159,7 +159,7 @@ public class CloudMLTQParserTest extends SolrCloudTestCase {
     QueryResponse queryResponse = cluster.getSolrClient().query(COLLECTION,
         new SolrQuery("{!mlt qf=lowerfilt_u,lowerfilt1_u mindf=0 mintf=1}26"));
     SolrDocumentList solrDocuments = queryResponse.getResults();
-    int[] expectedIds = new int[]{27, 3, 29, 28};
+    int[] expectedIds = new int[]{3, 29, 27, 28};
     int[] actualIds = new int[solrDocuments.size()];
     int i = 0;
     for (SolrDocument solrDocument : solrDocuments) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSortRandom.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSortRandom.java b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSortRandom.java
index 6f2e17c..dedb449 100644
--- a/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSortRandom.java
+++ b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSortRandom.java
@@ -268,8 +268,8 @@ public class TestFieldCacheSortRandom extends LuceneTestCase {
     }
 
     @Override
-    public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-      return new ConstantScoreWeight(this) {
+    public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+      return new ConstantScoreWeight(this, boost) {
         @Override
         public Scorer scorer(LeafReaderContext context) throws IOException {
           Random random = new Random(seed ^ context.docBase);


[5/5] lucene-solr:master: LUCENE-7368: Remove queryNorm.

Posted by jp...@apache.org.
LUCENE-7368: Remove queryNorm.


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

Branch: refs/heads/master
Commit: 5def78ba101dd87261c787dc865979769c4b58e4
Parents: 7b4af27
Author: Adrien Grand <jp...@gmail.com>
Authored: Thu Jul 7 18:17:20 2016 +0200
Committer: Adrien Grand <jp...@gmail.com>
Committed: Tue Jul 12 14:38:36 2016 +0200

----------------------------------------------------------------------
 lucene/CHANGES.txt                              |    2 +
 lucene/MIGRATE.txt                              |    7 +
 .../org/apache/lucene/search/BooleanQuery.java  |    4 +-
 .../org/apache/lucene/search/BooleanWeight.java |   29 +-
 .../org/apache/lucene/search/BoostQuery.java    |   44 +-
 .../lucene/search/ConstantScoreQuery.java       |    6 +-
 .../lucene/search/ConstantScoreWeight.java      |   35 +-
 .../lucene/search/DisjunctionMaxQuery.java      |   29 +-
 .../lucene/search/DocValuesRewriteMethod.java   |    4 +-
 .../apache/lucene/search/FieldValueQuery.java   |    4 +-
 .../org/apache/lucene/search/IndexSearcher.java |   27 +-
 .../org/apache/lucene/search/LRUQueryCache.java |    2 +-
 .../apache/lucene/search/MatchAllDocsQuery.java |    4 +-
 .../apache/lucene/search/MatchNoDocsQuery.java  |   25 +-
 .../apache/lucene/search/MultiPhraseQuery.java  |   17 +-
 .../MultiTermQueryConstantScoreWrapper.java     |    7 +-
 .../org/apache/lucene/search/PhraseQuery.java   |   18 +-
 .../apache/lucene/search/PointInSetQuery.java   |    4 +-
 .../apache/lucene/search/PointRangeQuery.java   |    4 +-
 .../java/org/apache/lucene/search/Query.java    |    3 +-
 .../lucene/search/RandomAccessWeight.java       |    4 +-
 .../org/apache/lucene/search/SynonymQuery.java  |   20 +-
 .../org/apache/lucene/search/TermQuery.java     |   20 +-
 .../java/org/apache/lucene/search/Weight.java   |   15 +-
 .../org/apache/lucene/search/package-info.java  |   26 +-
 .../search/similarities/BM25Similarity.java     |   25 +-
 .../lucene/search/similarities/BasicStats.java  |   35 +-
 .../search/similarities/ClassicSimilarity.java  |    6 -
 .../search/similarities/LMSimilarity.java       |    8 +-
 .../search/similarities/MultiSimilarity.java    |   20 +-
 .../similarities/PerFieldSimilarityWrapper.java |   14 +-
 .../lucene/search/similarities/Similarity.java  |   50 +-
 .../search/similarities/SimilarityBase.java     |    8 +-
 .../search/similarities/TFIDFSimilarity.java    |  134 +-
 .../search/spans/FieldMaskingSpanQuery.java     |    4 +-
 .../lucene/search/spans/SpanBoostQuery.java     |   54 +-
 .../lucene/search/spans/SpanContainQuery.java   |    4 +-
 .../search/spans/SpanContainingQuery.java       |   12 +-
 .../search/spans/SpanMultiTermQueryWrapper.java |    2 +-
 .../lucene/search/spans/SpanNearQuery.java      |   18 +-
 .../lucene/search/spans/SpanNotQuery.java       |   12 +-
 .../apache/lucene/search/spans/SpanOrQuery.java |   10 +-
 .../search/spans/SpanPositionCheckQuery.java    |   10 +-
 .../apache/lucene/search/spans/SpanQuery.java   |    2 +-
 .../lucene/search/spans/SpanTermQuery.java      |    8 +-
 .../apache/lucene/search/spans/SpanWeight.java  |   20 +-
 .../lucene/search/spans/SpanWithinQuery.java    |   12 +-
 .../apache/lucene/index/TestCustomNorms.java    |    7 +-
 .../apache/lucene/index/TestIndexSorting.java   |    4 +-
 .../lucene/index/TestMaxTermFrequency.java      |    1 -
 .../test/org/apache/lucene/index/TestNorms.java |    9 +-
 .../org/apache/lucene/index/TestOmitTf.java     |    2 -
 .../lucene/index/TestUniqueTermCount.java       |    2 +-
 .../apache/lucene/search/JustCompileSearch.java |   12 +-
 .../apache/lucene/search/TestBooleanScorer.java |   11 +-
 .../lucene/search/TestComplexExplanations.java  |   17 +-
 .../apache/lucene/search/TestConjunctions.java  |   13 +-
 .../lucene/search/TestConstantScoreQuery.java   |   13 +-
 .../lucene/search/TestDocValuesScoring.java     |    9 +-
 .../apache/lucene/search/TestLRUQueryCache.java |   18 +-
 .../lucene/search/TestMinShouldMatch2.java      |   11 +-
 .../lucene/search/TestMultiPhraseQuery.java     |   27 -
 .../search/TestMultiTermConstantScore.java      |   72 -
 .../apache/lucene/search/TestNeedsScores.java   |   14 +-
 .../lucene/search/TestPositionIncrement.java    |    4 +-
 .../search/TestPositiveScoresOnlyCollector.java |    2 +-
 .../apache/lucene/search/TestQueryRescorer.java |   11 +-
 .../search/TestScoreCachingWrappingScorer.java  |    2 +-
 .../apache/lucene/search/TestScorerPerf.java    |    4 +-
 .../apache/lucene/search/TestSimilarity.java    |    2 -
 .../lucene/search/TestSimilarityProvider.java   |   10 -
 .../apache/lucene/search/TestSortRandom.java    |    4 +-
 .../search/similarities/TestSimilarityBase.java |    8 +-
 .../search/spans/JustCompileSearchSpans.java    |    2 +-
 .../search/spans/TestFieldMaskingSpanQuery.java |   14 +-
 .../search/spans/TestNearSpansOrdered.java      |   26 +-
 .../lucene/search/spans/TestSpanCollection.java |    6 +-
 .../search/spans/TestSpanContainQuery.java      |    2 +-
 .../apache/lucene/search/spans/TestSpans.java   |   10 +-
 .../apache/lucene/facet/DrillSidewaysQuery.java |   14 +-
 .../apache/lucene/facet/range/DoubleRange.java  |    6 +-
 .../apache/lucene/facet/range/LongRange.java    |    6 +-
 .../apache/lucene/facet/TestDrillSideways.java  |    4 +-
 .../facet/range/TestRangeFacetCounts.java       |   14 +-
 .../highlight/WeightedSpanTermExtractor.java    |    4 +-
 .../lucene/search/join/GlobalOrdinalsQuery.java |    8 +-
 .../join/GlobalOrdinalsWithScoreQuery.java      |   15 +-
 .../join/PointInSetIncludingScoreQuery.java     |   13 +-
 .../search/join/TermsIncludingScoreQuery.java   |   13 +-
 .../search/join/ToChildBlockJoinQuery.java      |   14 +-
 .../search/join/ToParentBlockJoinQuery.java     |   14 +-
 .../lucene/search/join/TestBlockJoin.java       |    4 +-
 .../apache/lucene/search/join/TestJoinUtil.java |   13 +-
 .../search/TestDiversifiedTopDocsCollector.java |    4 +-
 .../apache/lucene/queries/BoostingQuery.java    |   18 +-
 .../apache/lucene/queries/CustomScoreQuery.java |   82 +-
 .../org/apache/lucene/queries/TermsQuery.java   |    7 +-
 .../lucene/queries/function/BoostedQuery.java   |   18 +-
 .../lucene/queries/function/FunctionQuery.java  |   37 +-
 .../queries/function/FunctionRangeQuery.java    |   13 +-
 .../queries/payloads/PayloadScoreQuery.java     |   20 +-
 .../queries/payloads/SpanPayloadCheckQuery.java |   10 +-
 .../queries/TestCustomScoreExplanations.java    |   12 +-
 .../lucene/queries/TestCustomScoreQuery.java    |    3 -
 .../function/TestLongNormValueSource.java       |    6 -
 .../queries/payloads/TestPayloadScoreQuery.java |    5 -
 .../queries/payloads/TestPayloadSpans.java      |   30 +-
 .../queries/payloads/TestPayloadTermQuery.java  |    9 +-
 .../document/LatLonPointDistanceQuery.java      |    4 +-
 .../document/LatLonPointInPolygonQuery.java     |    4 +-
 .../lucene/search/DocValuesNumbersQuery.java    |    4 +-
 .../lucene/search/DocValuesRangeQuery.java      |    4 +-
 .../lucene/search/DocValuesTermsQuery.java      |    4 +-
 .../lucene/search/TermAutomatonQuery.java       |   18 +-
 .../sandbox/queries/FuzzyLikeThisQueryTest.java |    8 +-
 .../sandbox/queries/TestSlowFuzzyQuery2.java    |  184 -
 .../lucene/sandbox/queries/fuzzyTestData.txt    | 3721 ------------------
 .../lucene/search/TestTermAutomatonQuery.java   |    4 +-
 .../spatial/composite/CompositeVerifyQuery.java |    6 +-
 .../composite/IntersectsRPTVerifyQuery.java     |    4 +-
 .../spatial/prefix/AbstractPrefixTreeQuery.java |    4 +-
 .../serialized/SerializedDVStrategy.java        |    4 +-
 .../GeoPointTermQueryConstantScoreWrapper.java  |    4 +-
 .../spatial3d/PointInGeo3DShapeQuery.java       |    4 +-
 .../suggest/document/CompletionWeight.java      |    8 -
 .../search/suggest/document/ContextQuery.java   |    4 +-
 .../suggest/document/FuzzyCompletionQuery.java  |    2 +-
 .../suggest/document/PrefixCompletionQuery.java |    2 +-
 .../suggest/document/RegexCompletionQuery.java  |    2 +-
 .../suggest/document/SuggestIndexSearcher.java  |    2 +-
 .../lucene/index/BaseNormsFormatTestCase.java   |    2 +-
 .../lucene/search/AssertingIndexSearcher.java   |   23 +-
 .../apache/lucene/search/AssertingQuery.java    |    4 +-
 .../apache/lucene/search/AssertingWeight.java   |   10 -
 .../lucene/search/RandomApproximationQuery.java |   14 +-
 .../search/similarities/RandomSimilarity.java   |    9 -
 .../lucene/search/spans/AssertingSpanQuery.java |    4 +-
 .../search/spans/AssertingSpanWeight.java       |   12 +-
 .../search/TestBaseExplanationTestCase.java     |   10 +-
 .../handler/component/RealTimeGetComponent.java |    2 +-
 .../java/org/apache/solr/query/FilterQuery.java |    6 +-
 .../org/apache/solr/query/SolrRangeQuery.java   |   11 +-
 .../java/org/apache/solr/schema/LatLonType.java |   10 +-
 .../apache/solr/search/ExportQParserPlugin.java |    4 +-
 .../src/java/org/apache/solr/search/Filter.java |   10 +-
 .../solr/search/GraphTermsQParserPlugin.java    |    4 +-
 .../apache/solr/search/HashQParserPlugin.java   |    4 +-
 .../apache/solr/search/JoinQParserPlugin.java   |    8 +-
 .../apache/solr/search/ReRankQParserPlugin.java |   17 +-
 .../solr/search/SolrConstantScoreQuery.java     |    8 +-
 .../org/apache/solr/search/WrappedQuery.java    |    4 +-
 .../org/apache/solr/search/join/GraphQuery.java |   22 +-
 .../similarities/SchemaSimilarityFactory.java   |    4 +-
 .../solr/update/DeleteByQueryWrapper.java       |   10 +-
 .../apache/solr/DisMaxRequestHandlerTest.java   |    4 +-
 .../cloud/DistribJoinFromCollectionTest.java    |    2 +-
 .../apache/solr/search/TestRankQueryPlugin.java |    4 +-
 .../solr/search/mlt/CloudMLTQParserTest.java    |    6 +-
 .../uninverting/TestFieldCacheSortRandom.java   |    4 +-
 159 files changed, 436 insertions(+), 5390 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index dfc9ebf..eba11c9 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -13,6 +13,8 @@ API Changes
 * LUCENE-7369: Similarity.coord and BooleanQuery.disableCoord are removed.
   (Adrien Grand)
 
+* LUCENE-7368: Removed query normalization. (Adrien Grand)
+
 Bug Fixes
 
 Improvements

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/MIGRATE.txt
----------------------------------------------------------------------
diff --git a/lucene/MIGRATE.txt b/lucene/MIGRATE.txt
index 9b24ecb..f914529 100644
--- a/lucene/MIGRATE.txt
+++ b/lucene/MIGRATE.txt
@@ -29,3 +29,10 @@ undesirable. The new BM25Similarity does not suffer from this problem since it
 has better saturation for the contribution of the term frequency so the coord
 factors have been removed from scores. Things now work as if coords were always
 disabled when constructing boolean queries.
+
+## Weight.getValueForNormalization() and Weight.normalize() removed (LUCENE-7368)
+
+Query normalization's goal was to make scores comparable across queries, which
+was only implemented by the ClassicSimilarity. Since ClassicSimilarity is not
+the default similarity anymore, this functionality has been removed. Boosts are
+now propagated through Query#createWeight.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java b/lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java
index c22b1bb..3742bfc 100644
--- a/lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java
@@ -196,12 +196,12 @@ public class BooleanQuery extends Query implements Iterable<BooleanClause> {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
     BooleanQuery query = this;
     if (needsScores == false) {
       query = rewriteNoScoring();
     }
-    return new BooleanWeight(query, searcher, needsScores);
+    return new BooleanWeight(query, searcher, needsScores, boost);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/BooleanWeight.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/BooleanWeight.java b/lucene/core/src/java/org/apache/lucene/search/BooleanWeight.java
index f55a6b7..ce4419f 100644
--- a/lucene/core/src/java/org/apache/lucene/search/BooleanWeight.java
+++ b/lucene/core/src/java/org/apache/lucene/search/BooleanWeight.java
@@ -42,14 +42,14 @@ final class BooleanWeight extends Weight {
   final ArrayList<Weight> weights;
   final boolean needsScores;
 
-  BooleanWeight(BooleanQuery query, IndexSearcher searcher, boolean needsScores) throws IOException {
+  BooleanWeight(BooleanQuery query, IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
     super(query);
     this.query = query;
     this.needsScores = needsScores;
     this.similarity = searcher.getSimilarity(needsScores);
     weights = new ArrayList<>();
     for (BooleanClause c : query) {
-      Weight w = searcher.createWeight(c.getQuery(), needsScores && c.isScoring());
+      Weight w = searcher.createWeight(c.getQuery(), needsScores && c.isScoring(), boost);
       weights.add(w);
     }
   }
@@ -66,31 +66,6 @@ final class BooleanWeight extends Weight {
   }
 
   @Override
-  public float getValueForNormalization() throws IOException {
-    float sum = 0.0f;
-    int i = 0;
-    for (BooleanClause clause : query) {
-      // call sumOfSquaredWeights for all clauses in case of side effects
-      float s = weights.get(i).getValueForNormalization();         // sum sub weights
-      if (clause.isScoring()) {
-        // only add to sum for scoring clauses
-        sum += s;
-      }
-      i += 1;
-    }
-
-    return sum ;
-  }
-
-  @Override
-  public void normalize(float norm, float boost) {
-    for (Weight w : weights) {
-      // normalize all clauses, (even if non-scoring in case of side affects)
-      w.normalize(norm, boost);
-    }
-  }
-
-  @Override
   public Explanation explain(LeafReaderContext context, int doc) throws IOException {
     final int minShouldMatch = query.getMinimumNumberShouldMatch();
     List<Explanation> subs = new ArrayList<>();

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/BoostQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/BoostQuery.java b/lucene/core/src/java/org/apache/lucene/search/BoostQuery.java
index eb7f4b9..5b05966 100644
--- a/lucene/core/src/java/org/apache/lucene/search/BoostQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/BoostQuery.java
@@ -19,11 +19,8 @@ package org.apache.lucene.search;
 
 import java.io.IOException;
 import java.util.Objects;
-import java.util.Set;
 
 import org.apache.lucene.index.IndexReader;
-import org.apache.lucene.index.LeafReaderContext;
-import org.apache.lucene.index.Term;
 
 /**
  * A {@link Query} wrapper that allows to give a boost to the wrapped query.
@@ -113,45 +110,8 @@ public final class BoostQuery extends Query {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    final Weight weight = query.createWeight(searcher, needsScores);
-    if (needsScores == false) {
-      return weight;
-    }
-    // Apply the query boost, this may impact the return value of getValueForNormalization()
-    weight.normalize(1f, boost);
-    return new Weight(this) {
-
-      @Override
-      public void extractTerms(Set<Term> terms) {
-        weight.extractTerms(terms);
-      }
-
-      @Override
-      public Explanation explain(LeafReaderContext context, int doc) throws IOException {
-        return weight.explain(context, doc);
-      }
-
-      @Override
-      public float getValueForNormalization() throws IOException {
-        return weight.getValueForNormalization();
-      }
-
-      @Override
-      public void normalize(float norm, float boost) {
-        weight.normalize(norm, BoostQuery.this.boost * boost);
-      }
-
-      @Override
-      public Scorer scorer(LeafReaderContext context) throws IOException {
-        return weight.scorer(context);
-      }
-      
-      @Override
-      public BulkScorer bulkScorer(LeafReaderContext context) throws IOException {
-        return weight.bulkScorer(context);
-      }
-    };
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    return query.createWeight(searcher, needsScores, BoostQuery.this.boost * boost);
   }
 
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/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 eb5e2d3..c5a7d08 100644
--- a/lucene/core/src/java/org/apache/lucene/search/ConstantScoreQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/ConstantScoreQuery.java
@@ -110,10 +110,10 @@ public final class ConstantScoreQuery extends Query {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    final Weight innerWeight = searcher.createWeight(query, false);
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    final Weight innerWeight = searcher.createWeight(query, false, 1f);
     if (needsScores) {
-      return new ConstantScoreWeight(this) {
+      return new ConstantScoreWeight(this, boost) {
 
         @Override
         public BulkScorer bulkScorer(LeafReaderContext context) throws IOException {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/ConstantScoreWeight.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/ConstantScoreWeight.java b/lucene/core/src/java/org/apache/lucene/search/ConstantScoreWeight.java
index 034a3a7..671ec71 100644
--- a/lucene/core/src/java/org/apache/lucene/search/ConstantScoreWeight.java
+++ b/lucene/core/src/java/org/apache/lucene/search/ConstantScoreWeight.java
@@ -32,13 +32,11 @@ import org.apache.lucene.index.Term;
  */
 public abstract class ConstantScoreWeight extends Weight {
 
-  private float boost;
-  private float queryNorm;
-  private float queryWeight;
+  private final float score;
 
-  protected ConstantScoreWeight(Query query) {
+  protected ConstantScoreWeight(Query query, float score) {
     super(query);
-    normalize(1f, 1f);
+    this.score = score;
   }
 
   @Override
@@ -48,31 +46,9 @@ public abstract class ConstantScoreWeight extends Weight {
     // override if your constant-score query does wrap terms
   }
 
-  @Override
-  public final float getValueForNormalization() throws IOException {
-    return queryWeight * queryWeight;
-  }
-
-  @Override
-  public void normalize(float norm, float boost) {
-    this.boost = boost;
-    queryNorm = norm;
-    queryWeight = queryNorm * boost;
-  }
-
-  /** Return the normalization factor for this weight. */
-  protected final float queryNorm() {
-    return queryNorm;
-  }
-
-  /** Return the boost for this weight. */
-  protected final float boost() {
-    return boost;
-  }
-
   /** Return the score produced by this {@link Weight}. */
   protected final float score() {
-    return queryWeight;
+    return score;
   }
 
   @Override
@@ -92,8 +68,7 @@ public abstract class ConstantScoreWeight extends Weight {
 
     if (exists) {
       return Explanation.match(
-          queryWeight, getQuery().toString() + ", product of:",
-          Explanation.match(boost, "boost"), Explanation.match(queryNorm, "queryNorm"));
+          score, getQuery().toString() + (score == 1f ? "" : "^" + score));
     } else {
       return Explanation.noMatch(getQuery().toString() + " doesn't match id " + doc);
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java b/lucene/core/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java
index 8b1c45d..b29126b 100644
--- a/lucene/core/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/DisjunctionMaxQuery.java
@@ -100,10 +100,10 @@ public final class DisjunctionMaxQuery extends Query implements Iterable<Query>
     private final boolean needsScores;
 
     /** Construct the Weight for this Query searched by searcher.  Recursively construct subquery weights. */
-    public DisjunctionMaxWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+    public DisjunctionMaxWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
       super(DisjunctionMaxQuery.this);
       for (Query disjunctQuery : disjuncts) {
-        weights.add(searcher.createWeight(disjunctQuery, needsScores));
+        weights.add(searcher.createWeight(disjunctQuery, needsScores, boost));
       }
       this.needsScores = needsScores;
     }
@@ -115,27 +115,6 @@ public final class DisjunctionMaxQuery extends Query implements Iterable<Query>
       }
     }
 
-    /** Compute the sub of squared weights of us applied to our subqueries.  Used for normalization. */
-    @Override
-    public float getValueForNormalization() throws IOException {
-      float max = 0.0f, sum = 0.0f;
-      for (Weight currentWeight : weights) {
-        float sub = currentWeight.getValueForNormalization();
-        sum += sub;
-        max = Math.max(max, sub);
-        
-      }
-      return (((sum - max) * tieBreakerMultiplier * tieBreakerMultiplier) + max);
-    }
-
-    /** Apply the computed normalization factor to our subqueries */
-    @Override
-    public void normalize(float norm, float boost) {
-      for (Weight wt : weights) {
-        wt.normalize(norm, boost);
-      }
-    }
-
     /** Create the scorer used to score our associated DisjunctionMaxQuery */
     @Override
     public Scorer scorer(LeafReaderContext context) throws IOException {
@@ -186,8 +165,8 @@ public final class DisjunctionMaxQuery extends Query implements Iterable<Query>
 
   /** Create the Weight used to score us */
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    return new DisjunctionMaxWeight(searcher, needsScores);
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    return new DisjunctionMaxWeight(searcher, needsScores, boost);
   }
 
   /** Optimize our representation and our subqueries representations

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/DocValuesRewriteMethod.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/DocValuesRewriteMethod.java b/lucene/core/src/java/org/apache/lucene/search/DocValuesRewriteMethod.java
index 261e8e5..43c3c05 100644
--- a/lucene/core/src/java/org/apache/lucene/search/DocValuesRewriteMethod.java
+++ b/lucene/core/src/java/org/apache/lucene/search/DocValuesRewriteMethod.java
@@ -73,8 +73,8 @@ public final class DocValuesRewriteMethod extends MultiTermQuery.RewriteMethod {
     public final String getField() { return query.getField(); }
     
     @Override
-    public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-      return new RandomAccessWeight(this) {
+    public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+      return new RandomAccessWeight(this, boost) {
         @Override
         protected Bits getMatchingDocs(LeafReaderContext context) throws IOException {
           final SortedSetDocValues fcsi = DocValues.getSortedSet(context.reader(), query.field);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/FieldValueQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/FieldValueQuery.java b/lucene/core/src/java/org/apache/lucene/search/FieldValueQuery.java
index ed3c5e7..42fc256 100644
--- a/lucene/core/src/java/org/apache/lucene/search/FieldValueQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/FieldValueQuery.java
@@ -59,8 +59,8 @@ public final class FieldValueQuery extends Query {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    return new RandomAccessWeight(this) {
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    return new RandomAccessWeight(this, boost) {
 
       @Override
       protected Bits getMatchingDocs(LeafReaderContext context) throws IOException {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java b/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java
index b81b807..5cae122 100644
--- a/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java
+++ b/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java
@@ -87,18 +87,8 @@ public class IndexSearcher {
     }
 
     @Override
-    public SimWeight computeWeight(CollectionStatistics collectionStats, TermStatistics... termStats) {
-      return new SimWeight() {
-
-        @Override
-        public float getValueForNormalization() {
-          return 1f;
-        }
-
-        @Override
-        public void normalize(float queryNorm, float boost) {}
-
-      };
+    public SimWeight computeWeight(float boost, CollectionStatistics collectionStats, TermStatistics... termStats) {
+      return new SimWeight() {};
     }
 
     @Override
@@ -732,14 +722,7 @@ public class IndexSearcher {
    */
   public Weight createNormalizedWeight(Query query, boolean needsScores) throws IOException {
     query = rewrite(query);
-    Weight weight = createWeight(query, needsScores);
-    float v = weight.getValueForNormalization();
-    float norm = getSimilarity(needsScores).queryNorm(v);
-    if (Float.isInfinite(norm) || Float.isNaN(norm)) {
-      norm = 1.0f;
-    }
-    weight.normalize(norm, 1.0f);
-    return weight;
+    return createWeight(query, needsScores, 1f);
   }
 
   /**
@@ -747,9 +730,9 @@ public class IndexSearcher {
    * if possible and configured.
    * @lucene.experimental
    */
-  public Weight createWeight(Query query, boolean needsScores) throws IOException {
+  public Weight createWeight(Query query, boolean needsScores, float boost) throws IOException {
     final QueryCache queryCache = this.queryCache;
-    Weight weight = query.createWeight(this, needsScores);
+    Weight weight = query.createWeight(this, needsScores, boost);
     if (needsScores == false && queryCache != null) {
       weight = queryCache.doCache(weight, queryCachingPolicy);
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/LRUQueryCache.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/LRUQueryCache.java b/lucene/core/src/java/org/apache/lucene/search/LRUQueryCache.java
index f555365..7ad208f 100644
--- a/lucene/core/src/java/org/apache/lucene/search/LRUQueryCache.java
+++ b/lucene/core/src/java/org/apache/lucene/search/LRUQueryCache.java
@@ -688,7 +688,7 @@ public class LRUQueryCache implements QueryCache, Accountable {
     private final AtomicBoolean used;
 
     CachingWrapperWeight(Weight in, QueryCachingPolicy policy) {
-      super(in.getQuery());
+      super(in.getQuery(), 1f);
       this.in = in;
       this.policy = policy;
       used = new AtomicBoolean(false);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/MatchAllDocsQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/MatchAllDocsQuery.java b/lucene/core/src/java/org/apache/lucene/search/MatchAllDocsQuery.java
index 2566cf0..296f502 100644
--- a/lucene/core/src/java/org/apache/lucene/search/MatchAllDocsQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/MatchAllDocsQuery.java
@@ -29,8 +29,8 @@ import org.apache.lucene.util.Bits;
 public final class MatchAllDocsQuery extends Query {
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) {
-    return new ConstantScoreWeight(this) {
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) {
+    return new ConstantScoreWeight(this, boost) {
       @Override
       public String toString() {
         return "weight(" + MatchAllDocsQuery.this + ")";

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/MatchNoDocsQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/MatchNoDocsQuery.java b/lucene/core/src/java/org/apache/lucene/search/MatchNoDocsQuery.java
index 825e082..e2d4f98 100644
--- a/lucene/core/src/java/org/apache/lucene/search/MatchNoDocsQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/MatchNoDocsQuery.java
@@ -42,7 +42,7 @@ public class MatchNoDocsQuery extends Query {
   }
   
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
     return new Weight(this) {
       @Override
       public void extractTerms(Set<Term> terms) {
@@ -58,29 +58,6 @@ public class MatchNoDocsQuery extends Query {
         return null;
       }
 
-      @Override
-      public final float getValueForNormalization() throws IOException {
-        return 0;
-      }
-
-      @Override
-      public void normalize(float norm, float boost) {
-      }
-
-      /** Return the normalization factor for this weight. */
-      protected final float queryNorm() {
-        return 0;
-      }
-
-      /** Return the boost for this weight. */
-      protected final float boost() {
-        return 0;
-      }
-
-      /** Return the score produced by this {@link Weight}. */
-      protected final float score() {
-        return 0;
-      }
     };
   }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/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 00af26c..afb6fc7 100644
--- a/lucene/core/src/java/org/apache/lucene/search/MultiPhraseQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/MultiPhraseQuery.java
@@ -187,7 +187,7 @@ public class MultiPhraseQuery extends Query {
     private final Map<Term,TermContext> termContexts = new HashMap<>();
     private final boolean needsScores;
 
-    public MultiPhraseWeight(IndexSearcher searcher, boolean needsScores)
+    public MultiPhraseWeight(IndexSearcher searcher, boolean needsScores, float boost)
       throws IOException {
       super(MultiPhraseQuery.this);
       this.needsScores = needsScores;
@@ -207,6 +207,7 @@ public class MultiPhraseQuery extends Query {
         }
       }
       stats = similarity.computeWeight(
+          boost,
           searcher.collectionStatistics(field),
           allTermStats.toArray(new TermStatistics[allTermStats.size()]));
     }
@@ -219,16 +220,6 @@ public class MultiPhraseQuery extends Query {
     }
 
     @Override
-    public float getValueForNormalization() {
-      return stats.getValueForNormalization();
-    }
-
-    @Override
-    public void normalize(float queryNorm, float boost) {
-      stats.normalize(queryNorm, boost);
-    }
-
-    @Override
     public Scorer scorer(LeafReaderContext context) throws IOException {
       assert termArrays.length != 0;
       final LeafReader reader = context.reader();
@@ -331,8 +322,8 @@ public class MultiPhraseQuery extends Query {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    return new MultiPhraseWeight(searcher, needsScores);
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    return new MultiPhraseWeight(searcher, needsScores, boost);
   }
 
   /** Prints a user-readable version of this query. */

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/MultiTermQueryConstantScoreWrapper.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/MultiTermQueryConstantScoreWrapper.java b/lucene/core/src/java/org/apache/lucene/search/MultiTermQueryConstantScoreWrapper.java
index ed4c430..54c6d48 100644
--- a/lucene/core/src/java/org/apache/lucene/search/MultiTermQueryConstantScoreWrapper.java
+++ b/lucene/core/src/java/org/apache/lucene/search/MultiTermQueryConstantScoreWrapper.java
@@ -108,8 +108,8 @@ final class MultiTermQueryConstantScoreWrapper<Q extends MultiTermQuery> extends
   public final String getField() { return query.getField(); }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    return new ConstantScoreWeight(this) {
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    return new ConstantScoreWeight(this, boost) {
 
       /** Try to collect terms from the given terms enum and return true iff all
        *  terms could be collected. If {@code false} is returned, the enum is
@@ -153,8 +153,7 @@ final class MultiTermQueryConstantScoreWrapper<Q extends MultiTermQuery> extends
             bq.add(new TermQuery(new Term(query.field, t.term), termContext), Occur.SHOULD);
           }
           Query q = new ConstantScoreQuery(bq.build());
-          final Weight weight = searcher.rewrite(q).createWeight(searcher, needsScores);
-          weight.normalize(1f, score());
+          final Weight weight = searcher.rewrite(q).createWeight(searcher, needsScores, score());
           return new WeightOrDocIdSet(weight);
         }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/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 64c0946..70dbed8 100644
--- a/lucene/core/src/java/org/apache/lucene/search/PhraseQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/PhraseQuery.java
@@ -356,7 +356,7 @@ public class PhraseQuery extends Query {
     private final boolean needsScores;
     private transient TermContext states[];
 
-    public PhraseWeight(IndexSearcher searcher, boolean needsScores)
+    public PhraseWeight(IndexSearcher searcher, boolean needsScores, float boost)
       throws IOException {
       super(PhraseQuery.this);
       final int[] positions = PhraseQuery.this.getPositions();
@@ -375,7 +375,7 @@ public class PhraseQuery extends Query {
         states[i] = TermContext.build(context, term);
         termStats[i] = searcher.termStatistics(term, states[i]);
       }
-      stats = similarity.computeWeight(searcher.collectionStatistics(field), termStats);
+      stats = similarity.computeWeight(boost, searcher.collectionStatistics(field), termStats);
     }
 
     @Override
@@ -387,16 +387,6 @@ public class PhraseQuery extends Query {
     public String toString() { return "weight(" + PhraseQuery.this + ")"; }
 
     @Override
-    public float getValueForNormalization() {
-      return stats.getValueForNormalization();
-    }
-
-    @Override
-    public void normalize(float queryNorm, float boost) {
-      stats.normalize(queryNorm, boost);
-    }
-
-    @Override
     public Scorer scorer(LeafReaderContext context) throws IOException {
       assert terms.length > 0;
       final LeafReader reader = context.reader();
@@ -507,8 +497,8 @@ public class PhraseQuery extends Query {
 
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    return new PhraseWeight(searcher, needsScores);
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    return new PhraseWeight(searcher, needsScores, boost);
   }
 
   /** Prints a user-readable version of this query. */

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/PointInSetQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/PointInSetQuery.java b/lucene/core/src/java/org/apache/lucene/search/PointInSetQuery.java
index 8569114..34b6ed8 100644
--- a/lucene/core/src/java/org/apache/lucene/search/PointInSetQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/PointInSetQuery.java
@@ -106,12 +106,12 @@ public abstract class PointInSetQuery extends Query {
   }
 
   @Override
-  public final Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+  public final Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
 
     // We don't use RandomAccessWeight here: it's no good to approximate with "match all docs".
     // This is an inverted structure and should be used in the first pass:
 
-    return new ConstantScoreWeight(this) {
+    return new ConstantScoreWeight(this, boost) {
 
       @Override
       public Scorer scorer(LeafReaderContext context) throws IOException {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/PointRangeQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/PointRangeQuery.java b/lucene/core/src/java/org/apache/lucene/search/PointRangeQuery.java
index 63de04c..1cd2d35 100644
--- a/lucene/core/src/java/org/apache/lucene/search/PointRangeQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/PointRangeQuery.java
@@ -98,12 +98,12 @@ public abstract class PointRangeQuery extends Query {
   }
 
   @Override
-  public final Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+  public final Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
 
     // We don't use RandomAccessWeight here: it's no good to approximate with "match all docs".
     // This is an inverted structure and should be used in the first pass:
 
-    return new ConstantScoreWeight(this) {
+    return new ConstantScoreWeight(this, boost) {
 
       private DocIdSet buildMatchingDocIdSet(LeafReader reader, PointValues values) throws IOException {
         DocIdSetBuilder result = new DocIdSetBuilder(reader.maxDoc(), values, field);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/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 8cab2d1..05aa94f 100644
--- a/lucene/core/src/java/org/apache/lucene/search/Query.java
+++ b/lucene/core/src/java/org/apache/lucene/search/Query.java
@@ -61,8 +61,9 @@ public abstract class Query {
    *
    * @param needsScores   True if document scores ({@link Scorer#score}) or match
    *                      frequencies ({@link Scorer#freq}) are needed.
+   * @param boost         The boost that is propagated by the parent queries.
    */
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
     throw new UnsupportedOperationException("Query " + this + " does not implement createWeight");
   }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/RandomAccessWeight.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/RandomAccessWeight.java b/lucene/core/src/java/org/apache/lucene/search/RandomAccessWeight.java
index fcc1d1a..950ce04 100644
--- a/lucene/core/src/java/org/apache/lucene/search/RandomAccessWeight.java
+++ b/lucene/core/src/java/org/apache/lucene/search/RandomAccessWeight.java
@@ -34,8 +34,8 @@ import org.apache.lucene.util.Bits.MatchNoBits;
 public abstract class RandomAccessWeight extends ConstantScoreWeight {
 
   /** Sole constructor. */
-  protected RandomAccessWeight(Query query) {
-    super(query);
+  protected RandomAccessWeight(Query query, float boost) {
+    super(query, boost);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/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 4d49cd9..c718dc9 100644
--- a/lucene/core/src/java/org/apache/lucene/search/SynonymQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/SynonymQuery.java
@@ -110,16 +110,16 @@ public final class SynonymQuery extends Query {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
     if (needsScores) {
-      return new SynonymWeight(this, searcher);
+      return new SynonymWeight(this, searcher, boost);
     } else {
       // if scores are not needed, let BooleanWeight deal with optimizing that case.
       BooleanQuery.Builder bq = new BooleanQuery.Builder();
       for (Term term : terms) {
         bq.add(new TermQuery(term), BooleanClause.Occur.SHOULD);
       }
-      return searcher.rewrite(bq.build()).createWeight(searcher, needsScores);
+      return searcher.rewrite(bq.build()).createWeight(searcher, needsScores, boost);
     }
   }
   
@@ -128,7 +128,7 @@ public final class SynonymQuery extends Query {
     private final Similarity similarity;
     private final Similarity.SimWeight simWeight;
 
-    SynonymWeight(Query query, IndexSearcher searcher) throws IOException {
+    SynonymWeight(Query query, IndexSearcher searcher, float boost) throws IOException {
       super(query);
       CollectionStatistics collectionStats = searcher.collectionStatistics(terms[0].field());
       long docFreq = 0;
@@ -146,7 +146,7 @@ public final class SynonymQuery extends Query {
       }
       TermStatistics pseudoStats = new TermStatistics(null, docFreq, totalTermFreq);
       this.similarity = searcher.getSimilarity(true);
-      this.simWeight = similarity.computeWeight(collectionStats, pseudoStats);
+      this.simWeight = similarity.computeWeight(boost, collectionStats, pseudoStats);
     }
 
     @Override
@@ -184,16 +184,6 @@ public final class SynonymQuery extends Query {
     }
 
     @Override
-    public float getValueForNormalization() throws IOException {
-      return simWeight.getValueForNormalization();
-    }
-
-    @Override
-    public void normalize(float norm, float boost) {
-      simWeight.normalize(norm, boost);
-    }
-
-    @Override
     public Scorer scorer(LeafReaderContext context) throws IOException {
       Similarity.SimScorer simScorer = similarity.simScorer(simWeight, context);
       // we use termscorers + disjunction as an impl detail

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/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 6547b10..590c3b3 100644
--- a/lucene/core/src/java/org/apache/lucene/search/TermQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/TermQuery.java
@@ -48,8 +48,8 @@ public class TermQuery extends Query {
     private final TermContext termStates;
     private final boolean needsScores;
 
-    public TermWeight(IndexSearcher searcher, boolean needsScores, TermContext termStates)
-        throws IOException {
+    public TermWeight(IndexSearcher searcher, boolean needsScores,
+        float boost, TermContext termStates) throws IOException {
       super(TermQuery.this);
       this.needsScores = needsScores;
       assert termStates != null : "TermContext must not be null";
@@ -70,7 +70,7 @@ public class TermQuery extends Query {
         termStats = new TermStatistics(term.bytes(), docFreq, totalTermFreq);
       }
      
-      this.stats = similarity.computeWeight(collectionStats, termStats);
+      this.stats = similarity.computeWeight(boost, collectionStats, termStats);
     }
 
     @Override
@@ -84,16 +84,6 @@ public class TermQuery extends Query {
     }
 
     @Override
-    public float getValueForNormalization() {
-      return stats.getValueForNormalization();
-    }
-
-    @Override
-    public void normalize(float queryNorm, float boost) {
-      stats.normalize(queryNorm, boost);
-    }
-
-    @Override
     public Scorer scorer(LeafReaderContext context) throws IOException {
       assert termStates.topReaderContext == ReaderUtil.getTopLevelContext(context) : "The top-reader used to create Weight (" + termStates.topReaderContext + ") is not the same as the current reader's top-reader (" + ReaderUtil.getTopLevelContext(context);
       final TermsEnum termsEnum = getTermsEnum(context);
@@ -173,7 +163,7 @@ public class TermQuery extends Query {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
     final IndexReaderContext context = searcher.getTopReaderContext();
     final TermContext termState;
     if (perReaderTermState == null
@@ -186,7 +176,7 @@ public class TermQuery extends Query {
       termState = this.perReaderTermState;
     }
 
-    return new TermWeight(searcher, needsScores, termState);
+    return new TermWeight(searcher, needsScores, boost, termState);
   }
 
   /** Prints a user-readable version of this query. */

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/Weight.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/Weight.java b/lucene/core/src/java/org/apache/lucene/search/Weight.java
index 40d2aaf..47f553e 100644
--- a/lucene/core/src/java/org/apache/lucene/search/Weight.java
+++ b/lucene/core/src/java/org/apache/lucene/search/Weight.java
@@ -24,7 +24,6 @@ import org.apache.lucene.index.IndexReaderContext;
 import org.apache.lucene.index.LeafReader;
 import org.apache.lucene.index.LeafReaderContext;
 import org.apache.lucene.index.Term;
-import org.apache.lucene.search.similarities.Similarity;
 import org.apache.lucene.util.Bits;
 
 /**
@@ -44,13 +43,7 @@ import org.apache.lucene.util.Bits;
  * A <code>Weight</code> is used in the following way:
  * <ol>
  * <li>A <code>Weight</code> is constructed by a top-level query, given a
- * <code>IndexSearcher</code> ({@link Query#createWeight(IndexSearcher, boolean)}).
- * <li>The {@link #getValueForNormalization()} method is called on the
- * <code>Weight</code> to compute the query normalization factor
- * {@link Similarity#queryNorm(float)} of the query clauses contained in the
- * query.
- * <li>The query normalization factor is passed to {@link #normalize(float, float)}. At
- * this point the weighting is complete.
+ * <code>IndexSearcher</code> ({@link Query#createWeight(IndexSearcher, boolean, float)}).
  * <li>A <code>Scorer</code> is constructed by
  * {@link #scorer(org.apache.lucene.index.LeafReaderContext)}.
  * </ol>
@@ -90,12 +83,6 @@ public abstract class Weight {
   public final Query getQuery() {
     return parentQuery;
   }
-  
-  /** The value for normalization of contained query clauses (e.g. sum of squared weights). */
-  public abstract float getValueForNormalization() throws IOException;
-
-  /** Assigns the query normalization factor and boost to this. */
-  public abstract void normalize(float norm, float boost);
 
   /**
    * Returns a {@link Scorer} which can iterate in order over all matching

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/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 5f9b213..b4d4780 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
@@ -357,7 +357,7 @@
  *         {@link org.apache.lucene.search.Query Query} class has several methods that are important for
  *         derived classes:
  *         <ol>
- *             <li>{@link org.apache.lucene.search.Query#createWeight(IndexSearcher,boolean) createWeight(IndexSearcher searcher,boolean)} &mdash; A
+ *             <li>{@link org.apache.lucene.search.Query#createWeight(IndexSearcher,boolean,float) createWeight(IndexSearcher searcher, boolean needsScores, float boost)} &mdash; A
  *                 {@link org.apache.lucene.search.Weight Weight} is the internal representation of the
  *                 Query, so each Query implementation must
  *                 provide an implementation of Weight. See the subsection on <a
@@ -366,7 +366,7 @@
  *             <li>{@link org.apache.lucene.search.Query#rewrite(org.apache.lucene.index.IndexReader) rewrite(IndexReader reader)} &mdash; Rewrites queries into primitive queries. Primitive queries are:
  *                 {@link org.apache.lucene.search.TermQuery TermQuery},
  *                 {@link org.apache.lucene.search.BooleanQuery BooleanQuery}, <span
- *                     >and other queries that implement {@link org.apache.lucene.search.Query#createWeight(IndexSearcher,boolean) createWeight(IndexSearcher searcher,boolean,float)}</span></li>
+ *                     >and other queries that implement {@link org.apache.lucene.search.Query#createWeight(IndexSearcher,boolean,float) createWeight(IndexSearcher searcher,boolean needsScores, float boost)}</span></li>
  *         </ol>
  * <a name="weightClass"></a>
  * <h3>The Weight Interface</h3>
@@ -381,28 +381,6 @@
  *                 {@link org.apache.lucene.search.Weight#getQuery getQuery()} &mdash; Pointer to the
  *                 Query that this Weight represents.</li>
  *             <li>
- *                 {@link org.apache.lucene.search.Weight#getValueForNormalization() getValueForNormalization()} &mdash; 
- *                 A weight can return a floating point value to indicate its magnitude for query normalization. Typically
- *                 a weight such as TermWeight that scores via a {@link org.apache.lucene.search.similarities.Similarity Similarity} 
- *                 will just defer to the Similarity's implementation: 
- *                 {@link org.apache.lucene.search.similarities.Similarity.SimWeight#getValueForNormalization SimWeight#getValueForNormalization()}.
- *                 For example, with {@link org.apache.lucene.search.similarities.TFIDFSimilarity Lucene's classic vector-space formula}, this
- *                 is implemented as the sum of squared weights: <code>(idf * boost)<sup>2</sup></code></li>
- *             <li>
- *                 {@link org.apache.lucene.search.Weight#normalize(float,float) normalize(float norm, float boost)} &mdash; 
- *                 Performs query normalization: 
- *                 <ul>
- *                 <li><code>boost</code>: A query-boost factor from any wrapping queries that should be multiplied into every
- *                 document's score. For example, a TermQuery that is wrapped within a BooleanQuery with a boost of <code>5</code> would
- *                 receive this value at this time. This allows the TermQuery (the leaf node in this case) to compute this up-front
- *                 a single time (e.g. by multiplying into the IDF), rather than for every document.</li> 
- *                 <li><code>norm</code>: Passes in a a normalization factor which may
- *                 allow for comparing scores between queries.</li>
- *                 </ul>
- *                 Typically a weight such as TermWeight
- *                 that scores via a {@link org.apache.lucene.search.similarities.Similarity Similarity} will just defer to the Similarity's implementation:
- *                 {@link org.apache.lucene.search.similarities.Similarity.SimWeight#normalize SimWeight#normalize(float,float)}.</li>
- *             <li>
  *                 {@link org.apache.lucene.search.Weight#scorer scorer()} &mdash;
  *                 Construct a new {@link org.apache.lucene.search.Scorer Scorer} for this Weight. See <a href="#scorerClass">The Scorer Class</a>
  *                 below for help defining a Scorer. As the name implies, the Scorer is responsible for doing the actual scoring of documents 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/similarities/BM25Similarity.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/similarities/BM25Similarity.java b/lucene/core/src/java/org/apache/lucene/search/similarities/BM25Similarity.java
index 99f76ef..cbce18e 100644
--- a/lucene/core/src/java/org/apache/lucene/search/similarities/BM25Similarity.java
+++ b/lucene/core/src/java/org/apache/lucene/search/similarities/BM25Similarity.java
@@ -205,7 +205,7 @@ public class BM25Similarity extends Similarity {
   }
 
   @Override
-  public final SimWeight computeWeight(CollectionStatistics collectionStats, TermStatistics... termStats) {
+  public final SimWeight computeWeight(float boost, CollectionStatistics collectionStats, TermStatistics... termStats) {
     Explanation idf = termStats.length == 1 ? idfExplain(collectionStats, termStats[0]) : idfExplain(collectionStats, termStats);
 
     float avgdl = avgFieldLength(collectionStats);
@@ -215,7 +215,7 @@ public class BM25Similarity extends Similarity {
     for (int i = 0; i < cache.length; i++) {
       cache[i] = k1 * ((1 - b) + b * decodeNormValue((byte)i) / avgdl);
     }
-    return new BM25Stats(collectionStats.field(), idf, avgdl, cache);
+    return new BM25Stats(collectionStats.field(), boost, idf, avgdl, cache);
   }
 
   @Override
@@ -267,34 +267,23 @@ public class BM25Similarity extends Similarity {
     /** The average document length. */
     private final float avgdl;
     /** query boost */
-    private float boost;
+    private final float boost;
     /** weight (idf * boost) */
-    private float weight;
+    private final float weight;
     /** field name, for pulling norms */
     private final String field;
     /** precomputed norm[256] with k1 * ((1 - b) + b * dl / avgdl) */
     private final float cache[];
 
-    BM25Stats(String field, Explanation idf, float avgdl, float cache[]) {
+    BM25Stats(String field, float boost, Explanation idf, float avgdl, float cache[]) {
       this.field = field;
+      this.boost = boost;
       this.idf = idf;
       this.avgdl = avgdl;
       this.cache = cache;
-      normalize(1f, 1f);
-    }
-
-    @Override
-    public float getValueForNormalization() {
-      // we return a TF-IDF like normalization to be nice, but we don't actually normalize ourselves.
-      return weight * weight;
+      this.weight = idf.getValue() * boost;
     }
 
-    @Override
-    public void normalize(float queryNorm, float boost) {
-      // we don't normalize with queryNorm at all, we just capture the top-level boost
-      this.boost = boost;
-      this.weight = idf.getValue() * boost;
-    } 
   }
 
   private Explanation explainTFNorm(int doc, Explanation freq, BM25Stats stats, NumericDocValues norms) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/similarities/BasicStats.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/similarities/BasicStats.java b/lucene/core/src/java/org/apache/lucene/search/similarities/BasicStats.java
index 5304d1f..a08fe2f 100644
--- a/lucene/core/src/java/org/apache/lucene/search/similarities/BasicStats.java
+++ b/lucene/core/src/java/org/apache/lucene/search/similarities/BasicStats.java
@@ -38,15 +38,13 @@ public class BasicStats extends Similarity.SimWeight {
   
   // -------------------------- Boost-related stuff --------------------------
 
-  /** For most Similarities, the immediate and the top level query boosts are
-   * not handled differently. Hence, this field is just the product of the
-   * other two. */
-  protected float boost;
+  /** A query boost. Should be applied as a multiplicative factor to the score. */
+  protected final float boost;
   
   /** Constructor. */
-  public BasicStats(String field) {
+  public BasicStats(String field, float boost) {
     this.field = field;
-    normalize(1f, 1f);
+    this.boost = boost;
   }
   
   // ------------------------- Getter/setter methods -------------------------
@@ -107,31 +105,6 @@ public class BasicStats extends Similarity.SimWeight {
     this.totalTermFreq = totalTermFreq;
   }
   
-  // -------------------------- Boost-related stuff --------------------------
-  
-  /** The square of the raw normalization value.
-   * @see #rawNormalizationValue() */
-  @Override
-  public float getValueForNormalization() {
-    float rawValue = rawNormalizationValue();
-    return rawValue * rawValue;
-  }
-  
-  /** Computes the raw normalization value. This basic implementation returns
-   * the query boost. Subclasses may override this method to include other
-   * factors (such as idf), or to save the value for inclusion in
-   * {@link #normalize(float, float)}, etc.
-   */
-  protected float rawNormalizationValue() {
-    return boost;
-  }
-  
-  /** No normalization is done. {@code boost} is saved in the object, however. */
-  @Override
-  public void normalize(float queryNorm, float boost) {
-    this.boost = boost;
-  }
-  
   /** Returns the total boost. */
   public float getBoost() {
     return boost;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/similarities/ClassicSimilarity.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/similarities/ClassicSimilarity.java b/lucene/core/src/java/org/apache/lucene/search/similarities/ClassicSimilarity.java
index 93b8261..fae85a0 100644
--- a/lucene/core/src/java/org/apache/lucene/search/similarities/ClassicSimilarity.java
+++ b/lucene/core/src/java/org/apache/lucene/search/similarities/ClassicSimilarity.java
@@ -55,12 +55,6 @@ public class ClassicSimilarity extends TFIDFSimilarity {
 
   /** Sole constructor: parameter-free */
   public ClassicSimilarity() {}
-
-  /** Implemented as <code>1/sqrt(sumOfSquaredWeights)</code>. */
-  @Override
-  public float queryNorm(float sumOfSquaredWeights) {
-    return (float)(1.0 / Math.sqrt(sumOfSquaredWeights));
-  }
   
   /**
    * Encodes a normalization factor for storage in an index.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/similarities/LMSimilarity.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/similarities/LMSimilarity.java b/lucene/core/src/java/org/apache/lucene/search/similarities/LMSimilarity.java
index fb8fbf4..2e484eb 100644
--- a/lucene/core/src/java/org/apache/lucene/search/similarities/LMSimilarity.java
+++ b/lucene/core/src/java/org/apache/lucene/search/similarities/LMSimilarity.java
@@ -54,8 +54,8 @@ public abstract class LMSimilarity extends SimilarityBase {
   }
   
   @Override
-  protected BasicStats newStats(String field) {
-    return new LMStats(field);
+  protected BasicStats newStats(String field, float boost) {
+    return new LMStats(field, boost);
   }
 
   /**
@@ -108,8 +108,8 @@ public abstract class LMSimilarity extends SimilarityBase {
     /**
      * Creates LMStats for the provided field and query-time boost
      */
-    public LMStats(String field) {
-      super(field);
+    public LMStats(String field, float boost) {
+      super(field, boost);
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/similarities/MultiSimilarity.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/similarities/MultiSimilarity.java b/lucene/core/src/java/org/apache/lucene/search/similarities/MultiSimilarity.java
index c4b7dd6..68828fc 100644
--- a/lucene/core/src/java/org/apache/lucene/search/similarities/MultiSimilarity.java
+++ b/lucene/core/src/java/org/apache/lucene/search/similarities/MultiSimilarity.java
@@ -50,10 +50,10 @@ public class MultiSimilarity extends Similarity {
   }
 
   @Override
-  public SimWeight computeWeight(CollectionStatistics collectionStats, TermStatistics... termStats) {
+  public SimWeight computeWeight(float boost, CollectionStatistics collectionStats, TermStatistics... termStats) {
     SimWeight subStats[] = new SimWeight[sims.length];
     for (int i = 0; i < subStats.length; i++) {
-      subStats[i] = sims[i].computeWeight(collectionStats, termStats);
+      subStats[i] = sims[i].computeWeight(boost, collectionStats, termStats);
     }
     return new MultiStats(subStats);
   }
@@ -109,21 +109,5 @@ public class MultiSimilarity extends Similarity {
     MultiStats(SimWeight subStats[]) {
       this.subStats = subStats;
     }
-    
-    @Override
-    public float getValueForNormalization() {
-      float sum = 0.0f;
-      for (SimWeight stat : subStats) {
-        sum += stat.getValueForNormalization();
-      }
-      return sum / subStats.length;
-    }
-
-    @Override
-    public void normalize(float queryNorm, float boost) {
-      for (SimWeight stat : subStats) {
-        stat.normalize(queryNorm, boost);
-      }
-    }
   }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/similarities/PerFieldSimilarityWrapper.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/similarities/PerFieldSimilarityWrapper.java b/lucene/core/src/java/org/apache/lucene/search/similarities/PerFieldSimilarityWrapper.java
index cfbb9a5..6c05616 100644
--- a/lucene/core/src/java/org/apache/lucene/search/similarities/PerFieldSimilarityWrapper.java
+++ b/lucene/core/src/java/org/apache/lucene/search/similarities/PerFieldSimilarityWrapper.java
@@ -46,10 +46,10 @@ public abstract class PerFieldSimilarityWrapper extends Similarity {
   }
 
   @Override
-  public final SimWeight computeWeight(CollectionStatistics collectionStats, TermStatistics... termStats) {
+  public final SimWeight computeWeight(float boost, CollectionStatistics collectionStats, TermStatistics... termStats) {
     PerFieldSimWeight weight = new PerFieldSimWeight();
     weight.delegate = get(collectionStats.field());
-    weight.delegateWeight = weight.delegate.computeWeight(collectionStats, termStats);
+    weight.delegateWeight = weight.delegate.computeWeight(boost, collectionStats, termStats);
     return weight;
   }
 
@@ -67,15 +67,5 @@ public abstract class PerFieldSimilarityWrapper extends Similarity {
   static class PerFieldSimWeight extends SimWeight {
     Similarity delegate;
     SimWeight delegateWeight;
-    
-    @Override
-    public float getValueForNormalization() {
-      return delegateWeight.getValueForNormalization();
-    }
-    
-    @Override
-    public void normalize(float queryNorm, float boost) {
-      delegateWeight.normalize(queryNorm, boost);
-    }
   }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/similarities/Similarity.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/similarities/Similarity.java b/lucene/core/src/java/org/apache/lucene/search/similarities/Similarity.java
index e66fa5f..6a6e93b 100644
--- a/lucene/core/src/java/org/apache/lucene/search/similarities/Similarity.java
+++ b/lucene/core/src/java/org/apache/lucene/search/similarities/Similarity.java
@@ -19,7 +19,6 @@ package org.apache.lucene.search.similarities;
 
 import org.apache.lucene.index.FieldInvertState;
 import org.apache.lucene.index.LeafReaderContext;
-import org.apache.lucene.search.BooleanQuery;
 import org.apache.lucene.search.CollectionStatistics;
 import org.apache.lucene.search.Explanation;
 import org.apache.lucene.search.IndexSearcher;
@@ -78,16 +77,12 @@ import java.util.Collections;
  * <a name="querytime">Query time</a>
  * At query-time, Queries interact with the Similarity via these steps:
  * <ol>
- *   <li>The {@link #computeWeight(CollectionStatistics, TermStatistics...)} method is called a single time,
+ *   <li>The {@link #computeWeight(float, CollectionStatistics, TermStatistics...)} method is called a single time,
  *       allowing the implementation to compute any statistics (such as IDF, average document length, etc)
  *       across <i>the entire collection</i>. The {@link TermStatistics} and {@link CollectionStatistics} passed in 
  *       already contain all of the raw statistics involved, so a Similarity can freely use any combination
  *       of statistics without causing any additional I/O. Lucene makes no assumption about what is 
  *       stored in the returned {@link Similarity.SimWeight} object.
- *   <li>The query normalization process occurs a single time: {@link Similarity.SimWeight#getValueForNormalization()}
- *       is called for each query leaf node, {@link Similarity#queryNorm(float)} is called for the top-level
- *       query, and finally {@link Similarity.SimWeight#normalize(float, float)} passes down the normalization value
- *       and any top-level boosts (e.g. from enclosing {@link BooleanQuery}s).
  *   <li>For each segment in the index, the Query creates a {@link #simScorer(SimWeight, org.apache.lucene.index.LeafReaderContext)}
  *       The score() method is called for each matching document.
  * </ol>
@@ -109,23 +104,6 @@ public abstract class Similarity {
    */
   public Similarity() {}
   
-  /** Computes the normalization value for a query given the sum of the
-   * normalized weights {@link SimWeight#getValueForNormalization()} of 
-   * each of the query terms.  This value is passed back to the 
-   * weight ({@link SimWeight#normalize(float, float)} of each query 
-   * term, to provide a hook to attempt to make scores from different
-   * queries comparable.
-   * <p>
-   * By default this is disabled (returns <code>1</code>), but some
-   * implementations such as {@link TFIDFSimilarity} override this.
-   * 
-   * @param valueForNormalization the sum of the term normalization values
-   * @return a normalization factor for query weights
-   */
-  public float queryNorm(float valueForNormalization) {
-    return 1f;
-  }
-  
   /**
    * Computes the normalization value for a field, given the accumulated
    * state of term processing for this field (see {@link FieldInvertState}).
@@ -144,15 +122,17 @@ public abstract class Similarity {
   /**
    * Compute any collection-level weight (e.g. IDF, average document length, etc) needed for scoring a query.
    *
+   * @param boost a multiplicative factor to apply to the produces scores
    * @param collectionStats collection-level statistics, such as the number of tokens in the collection.
    * @param termStats term-level statistics, such as the document frequency of a term across the collection.
    * @return SimWeight object with the information this Similarity needs to score a query.
    */
-  public abstract SimWeight computeWeight(CollectionStatistics collectionStats, TermStatistics... termStats);
+  public abstract SimWeight computeWeight(float boost,
+      CollectionStatistics collectionStats, TermStatistics... termStats);
 
   /**
    * Creates a new {@link Similarity.SimScorer} to score matching documents from a segment of the inverted index.
-   * @param weight collection information from {@link #computeWeight(CollectionStatistics, TermStatistics...)}
+   * @param weight collection information from {@link #computeWeight(float, CollectionStatistics, TermStatistics...)}
    * @param context segment of the inverted index to be scored.
    * @return SloppySimScorer for scoring documents across <code>context</code>
    * @throws IOException if there is a low-level I/O error
@@ -215,24 +195,6 @@ public abstract class Similarity {
      * constructors, typically implicit.)
      */
     public SimWeight() {}
-    
-    /** The value for normalization of contained query clauses (e.g. sum of squared weights).
-     * <p>
-     * NOTE: a Similarity implementation might not use any query normalization at all,
-     * it's not required. However, if it wants to participate in query normalization,
-     * it can return a value here.
-     */
-    public abstract float getValueForNormalization();
-    
-    /** Assigns the query normalization factor and boost from parent queries to this.
-     * <p>
-     * NOTE: a Similarity implementation might not use this normalized value at all,
-     * it's not required. However, it's usually a good idea to at least incorporate 
-     * the boost into its score.
-     * <p>
-     * NOTE: If this method is called several times, it behaves as if only the
-     * last call was performed.
-     */
-    public abstract void normalize(float queryNorm, float boost);
+
   }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/similarities/SimilarityBase.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/similarities/SimilarityBase.java b/lucene/core/src/java/org/apache/lucene/search/similarities/SimilarityBase.java
index 0b7c342..c2c117d 100644
--- a/lucene/core/src/java/org/apache/lucene/search/similarities/SimilarityBase.java
+++ b/lucene/core/src/java/org/apache/lucene/search/similarities/SimilarityBase.java
@@ -83,18 +83,18 @@ public abstract class SimilarityBase extends Similarity {
   }
   
   @Override
-  public final SimWeight computeWeight(CollectionStatistics collectionStats, TermStatistics... termStats) {
+  public final SimWeight computeWeight(float boost, CollectionStatistics collectionStats, TermStatistics... termStats) {
     BasicStats stats[] = new BasicStats[termStats.length];
     for (int i = 0; i < termStats.length; i++) {
-      stats[i] = newStats(collectionStats.field());
+      stats[i] = newStats(collectionStats.field(), boost);
       fillBasicStats(stats[i], collectionStats, termStats[i]);
     }
     return stats.length == 1 ? stats[0] : new MultiSimilarity.MultiStats(stats);
   }
   
   /** Factory method to return a custom stats object */
-  protected BasicStats newStats(String field) {
-    return new BasicStats(field);
+  protected BasicStats newStats(String field, float boost) {
+    return new BasicStats(field, boost);
   }
   
   /** Fills all member fields defined in {@code BasicStats} in {@code stats}. 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/similarities/TFIDFSimilarity.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/similarities/TFIDFSimilarity.java b/lucene/core/src/java/org/apache/lucene/search/similarities/TFIDFSimilarity.java
index 3e92375..ff708b4 100644
--- a/lucene/core/src/java/org/apache/lucene/search/similarities/TFIDFSimilarity.java
+++ b/lucene/core/src/java/org/apache/lucene/search/similarities/TFIDFSimilarity.java
@@ -262,9 +262,6 @@ import org.apache.lucene.util.BytesRef;
  *   <tr>
  *     <td valign="middle" align="right" rowspan="1">
  *       score(q,d) &nbsp; = &nbsp;
- *       <A HREF="#formula_queryNorm"><span style="color: #FF33CC">queryNorm(q)</span></A> &nbsp;&middot;&nbsp;
- *     </td>
- *     <td valign="bottom" align="center" rowspan="1" style="text-align: center">
  *       <big><big><big>&sum;</big></big></big>
  *     </td>
  *     <td valign="middle" align="right" rowspan="1">
@@ -354,72 +351,6 @@ import org.apache.lucene.util.BytesRef;
  *      <br>&nbsp;<br>
  *    </li>
  *
- *    <li><b>
- *      <A NAME="formula_queryNorm"></A>
- *      <i>queryNorm(q)</i>
- *      </b>
- *      is a normalizing factor used to make scores between queries comparable.
- *      This factor does not affect document ranking (since all ranked documents are multiplied by the same factor),
- *      but rather just attempts to make scores from different queries (or even different indexes) comparable.
- *      This is a search time factor computed by the Similarity in effect at search time.
- *
- *      The default computation in
- *      {@link org.apache.lucene.search.similarities.ClassicSimilarity#queryNorm(float) ClassicSimilarity}
- *      produces a <a href="http://en.wikipedia.org/wiki/Euclidean_norm#Euclidean_norm">Euclidean norm</a>:
- *      <br>&nbsp;<br>
- *      <table cellpadding="1" cellspacing="0" border="0" style="width:auto; margin-left:auto; margin-right:auto" summary="query normalization computation">
- *        <tr>
- *          <td valign="middle" align="right" rowspan="1">
- *            queryNorm(q)  &nbsp; = &nbsp;
- *            {@link org.apache.lucene.search.similarities.ClassicSimilarity#queryNorm(float) queryNorm(sumOfSquaredWeights)}
- *            &nbsp; = &nbsp;
- *          </td>
- *          <td valign="middle" align="center" rowspan="1">
- *            <table summary="query normalization computation">
- *               <tr><td align="center" style="text-align: center"><big>1</big></td></tr>
- *               <tr><td align="center" style="text-align: center"><big>
- *                  &ndash;&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;&ndash;
- *               </big></td></tr>
- *               <tr><td align="center" style="text-align: center">sumOfSquaredWeights<sup><big>&frac12;</big></sup></td></tr>
- *            </table>
- *          </td>
- *        </tr>
- *      </table>
- *      <br>&nbsp;<br>
- *
- *      The sum of squared weights (of the query terms) is
- *      computed by the query {@link org.apache.lucene.search.Weight} object.
- *      For example, a {@link org.apache.lucene.search.BooleanQuery}
- *      computes this value as:
- *
- *      <br>&nbsp;<br>
- *      <table cellpadding="1" cellspacing="0" border="0" style="width:auto; margin-left:auto; margin-right:auto" summary="sum of squared weights computation">
- *        <tr>
- *          <td valign="middle" align="right" rowspan="1">
- *            {@link org.apache.lucene.search.Weight#getValueForNormalization() sumOfSquaredWeights} &nbsp; = &nbsp;
- *            {@link org.apache.lucene.search.BoostQuery#getBoost() q.getBoost()} <sup><big>2</big></sup>
- *            &nbsp;&middot;&nbsp;
- *          </td>
- *          <td valign="bottom" align="center" rowspan="1" style="text-align: center">
- *            <big><big><big>&sum;</big></big></big>
- *          </td>
- *          <td valign="middle" align="right" rowspan="1">
- *            <big><big>(</big></big>
- *            <A HREF="#formula_idf">idf(t)</A> &nbsp;&middot;&nbsp;
- *            <A HREF="#formula_termBoost">t.getBoost()</A>
- *            <big><big>) <sup>2</sup> </big></big>
- *          </td>
- *        </tr>
- *        <tr valign="top">
- *          <td></td>
- *          <td align="center" style="text-align: center"><small>t in q</small></td>
- *          <td></td>
- *        </tr>
- *      </table>
- *      <br>&nbsp;<br>
- *
- *    </li>
- *
  *    <li>
  *      <A NAME="formula_termBoost"></A>
  *      <b><i>t.getBoost()</i></b>
@@ -495,22 +426,6 @@ public abstract class TFIDFSimilarity extends Similarity {
    */
   public TFIDFSimilarity() {}
   
-  /** Computes the normalization value for a query given the sum of the squared
-   * weights of each of the query terms.  This value is multiplied into the
-   * weight of each query term. While the classic query normalization factor is
-   * computed as 1/sqrt(sumOfSquaredWeights), other implementations might
-   * completely ignore sumOfSquaredWeights (ie return 1).
-   *
-   * <p>This does not affect ranking, but the default implementation does make scores
-   * from different queries more comparable than they would be by eliminating the
-   * magnitude of the Query vector as a factor in the score.
-   *
-   * @param sumOfSquaredWeights the sum of the squares of query term weights
-   * @return a normalization factor for query weights
-   */
-  @Override
-  public abstract float queryNorm(float sumOfSquaredWeights);
-  
   /** Computes a score factor based on a term or phrase's frequency in a
    * document.  This value is multiplied by the {@link #idf(long, long)}
    * factor for each term in the query and these products are then summed to
@@ -652,11 +567,11 @@ public abstract class TFIDFSimilarity extends Similarity {
   public abstract float scorePayload(int doc, int start, int end, BytesRef payload);
 
   @Override
-  public final SimWeight computeWeight(CollectionStatistics collectionStats, TermStatistics... termStats) {
+  public final SimWeight computeWeight(float boost, CollectionStatistics collectionStats, TermStatistics... termStats) {
     final Explanation idf = termStats.length == 1
     ? idfExplain(collectionStats, termStats[0])
     : idfExplain(collectionStats, termStats);
-    return new IDFStats(collectionStats.field(), idf);
+    return new IDFStats(collectionStats.field(), boost, idf);
   }
 
   @Override
@@ -672,7 +587,7 @@ public abstract class TFIDFSimilarity extends Similarity {
     
     TFIDFSimScorer(IDFStats stats, NumericDocValues norms) throws IOException {
       this.stats = stats;
-      this.weightValue = stats.value;
+      this.weightValue = stats.queryWeight;
       this.norms = norms;
     }
     
@@ -705,49 +620,18 @@ public abstract class TFIDFSimilarity extends Similarity {
     private final String field;
     /** The idf and its explanation */
     private final Explanation idf;
-    private float queryNorm;
-    private float boost;
-    private float queryWeight;
-    private float value;
+    private final float boost;
+    private final float queryWeight;
     
-    public IDFStats(String field, Explanation idf) {
+    public IDFStats(String field, float boost, Explanation idf) {
       // TODO: Validate?
       this.field = field;
       this.idf = idf;
-      normalize(1f, 1f);
-    }
-
-    @Override
-    public float getValueForNormalization() {
-      // TODO: (sorta LUCENE-1907) make non-static class and expose this squaring via a nice method to subclasses?
-      return queryWeight * queryWeight;  // sum of squared weights
-    }
-
-    @Override
-    public void normalize(float queryNorm, float boost) {
       this.boost = boost;
-      this.queryNorm = queryNorm;
-      queryWeight = queryNorm * boost * idf.getValue();
-      value = queryWeight * idf.getValue();         // idf for document
+      this.queryWeight = boost * idf.getValue();
     }
   }  
 
-  private Explanation explainQuery(IDFStats stats) {
-    List<Explanation> subs = new ArrayList<>();
-
-    Explanation boostExpl = Explanation.match(stats.boost, "boost");
-    if (stats.boost != 1.0f)
-      subs.add(boostExpl);
-    subs.add(stats.idf);
-
-    Explanation queryNormExpl = Explanation.match(stats.queryNorm,"queryNorm");
-    subs.add(queryNormExpl);
-
-    return Explanation.match(
-        boostExpl.getValue() * stats.idf.getValue() * queryNormExpl.getValue(),
-        "queryWeight, product of:", subs);
-  }
-
   private Explanation explainField(int doc, Explanation freq, IDFStats stats, NumericDocValues norms) {
     Explanation tfExplanation = Explanation.match(tf(freq.getValue()), "tf(freq="+freq.getValue()+"), with freq of:", freq);
     Explanation fieldNormExpl = Explanation.match(
@@ -761,9 +645,9 @@ public abstract class TFIDFSimilarity extends Similarity {
   }
 
   private Explanation explainScore(int doc, Explanation freq, IDFStats stats, NumericDocValues norms) {
-    Explanation queryExpl = explainQuery(stats);
+    Explanation queryExpl = Explanation.match(stats.boost, "boost");
     Explanation fieldExpl = explainField(doc, freq, stats, norms);
-    if (queryExpl.getValue() == 1f) {
+    if (stats.boost == 1f) {
       return fieldExpl;
     }
     return Explanation.match(

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/spans/FieldMaskingSpanQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/spans/FieldMaskingSpanQuery.java b/lucene/core/src/java/org/apache/lucene/search/spans/FieldMaskingSpanQuery.java
index 5c5e4dc..7759683 100644
--- a/lucene/core/src/java/org/apache/lucene/search/spans/FieldMaskingSpanQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/spans/FieldMaskingSpanQuery.java
@@ -89,8 +89,8 @@ public final class FieldMaskingSpanQuery extends SpanQuery {
   // ...this is done to be more consistent with things like SpanFirstQuery
 
   @Override
-  public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    return maskedQuery.createWeight(searcher, needsScores);
+  public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    return maskedQuery.createWeight(searcher, needsScores, boost);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/spans/SpanBoostQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/spans/SpanBoostQuery.java b/lucene/core/src/java/org/apache/lucene/search/spans/SpanBoostQuery.java
index 9ecd743..0ce3b0a 100644
--- a/lucene/core/src/java/org/apache/lucene/search/spans/SpanBoostQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/spans/SpanBoostQuery.java
@@ -18,17 +18,10 @@ package org.apache.lucene.search.spans;
 
 
 import java.io.IOException;
-import java.util.Map;
 import java.util.Objects;
-import java.util.Set;
-import java.util.TreeMap;
 
 import org.apache.lucene.index.IndexReader;
-import org.apache.lucene.index.LeafReaderContext;
-import org.apache.lucene.index.Term;
-import org.apache.lucene.index.TermContext;
 import org.apache.lucene.search.BoostQuery;
-import org.apache.lucene.search.Explanation;
 import org.apache.lucene.search.IndexSearcher;
 import org.apache.lucene.search.Query;
 
@@ -115,51 +108,8 @@ public final class SpanBoostQuery extends SpanQuery {
   }
 
   @Override
-  public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    final SpanWeight weight = query.createWeight(searcher, needsScores);
-    if (needsScores == false) {
-      return weight;
-    }
-    Map<Term, TermContext> terms = new TreeMap<>();
-    weight.extractTermContexts(terms);
-    weight.normalize(1f, boost);
-    return new SpanWeight(this, searcher, terms) {
-      
-      @Override
-      public void extractTerms(Set<Term> terms) {
-        weight.extractTerms(terms);
-      }
-
-      @Override
-      public Explanation explain(LeafReaderContext context, int doc) throws IOException {
-        return weight.explain(context, doc);
-      }
-
-      @Override
-      public float getValueForNormalization() throws IOException {
-        return weight.getValueForNormalization();
-      }
-
-      @Override
-      public void normalize(float norm, float boost) {
-        weight.normalize(norm, SpanBoostQuery.this.boost * boost);
-      }
-      
-      @Override
-      public Spans getSpans(LeafReaderContext ctx, Postings requiredPostings) throws IOException {
-        return weight.getSpans(ctx, requiredPostings);
-      }
-
-      @Override
-      public SpanScorer scorer(LeafReaderContext context) throws IOException {
-        return weight.scorer(context);
-      }
-
-      @Override
-      public void extractTermContexts(Map<Term,TermContext> contexts) {
-        weight.extractTermContexts(contexts);
-      }
-    };
+  public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    return query.createWeight(searcher, needsScores, SpanBoostQuery.this.boost * boost);
   }
 
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/spans/SpanContainQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/spans/SpanContainQuery.java b/lucene/core/src/java/org/apache/lucene/search/spans/SpanContainQuery.java
index b122a09..8bb2633 100644
--- a/lucene/core/src/java/org/apache/lucene/search/spans/SpanContainQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/spans/SpanContainQuery.java
@@ -62,8 +62,8 @@ abstract class SpanContainQuery extends SpanQuery implements Cloneable {
     final SpanWeight littleWeight;
 
     public SpanContainWeight(IndexSearcher searcher, Map<Term, TermContext> terms,
-                             SpanWeight bigWeight, SpanWeight littleWeight) throws IOException {
-      super(SpanContainQuery.this, searcher, terms);
+                             SpanWeight bigWeight, SpanWeight littleWeight, float boost) throws IOException {
+      super(SpanContainQuery.this, searcher, terms, boost);
       this.bigWeight = bigWeight;
       this.littleWeight = littleWeight;
     }


[4/5] lucene-solr:master: LUCENE-7368: Remove queryNorm.

Posted by jp...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/spans/SpanContainingQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/spans/SpanContainingQuery.java b/lucene/core/src/java/org/apache/lucene/search/spans/SpanContainingQuery.java
index bfa3f85..0ce7093 100644
--- a/lucene/core/src/java/org/apache/lucene/search/spans/SpanContainingQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/spans/SpanContainingQuery.java
@@ -43,18 +43,18 @@ public final class SpanContainingQuery extends SpanContainQuery {
   }
 
   @Override
-  public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    SpanWeight bigWeight = big.createWeight(searcher, false);
-    SpanWeight littleWeight = little.createWeight(searcher, false);
+  public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    SpanWeight bigWeight = big.createWeight(searcher, false, boost);
+    SpanWeight littleWeight = little.createWeight(searcher, false, boost);
     return new SpanContainingWeight(searcher, needsScores ? getTermContexts(bigWeight, littleWeight) : null,
-                                      bigWeight, littleWeight);
+                                      bigWeight, littleWeight, boost);
   }
 
   public class SpanContainingWeight extends SpanContainWeight {
 
     public SpanContainingWeight(IndexSearcher searcher, Map<Term, TermContext> terms,
-                                SpanWeight bigWeight, SpanWeight littleWeight) throws IOException {
-      super(searcher, terms, bigWeight, littleWeight);
+                                SpanWeight bigWeight, SpanWeight littleWeight, float boost) throws IOException {
+      super(searcher, terms, bigWeight, littleWeight, boost);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/spans/SpanMultiTermQueryWrapper.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/spans/SpanMultiTermQueryWrapper.java b/lucene/core/src/java/org/apache/lucene/search/spans/SpanMultiTermQueryWrapper.java
index f4c6f24..9c844d1 100644
--- a/lucene/core/src/java/org/apache/lucene/search/spans/SpanMultiTermQueryWrapper.java
+++ b/lucene/core/src/java/org/apache/lucene/search/spans/SpanMultiTermQueryWrapper.java
@@ -95,7 +95,7 @@ public class SpanMultiTermQueryWrapper<Q extends MultiTermQuery> extends SpanQue
   }
 
   @Override
-  public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+  public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
     throw new IllegalArgumentException("Rewrite first!");
   }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/spans/SpanNearQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/spans/SpanNearQuery.java b/lucene/core/src/java/org/apache/lucene/search/spans/SpanNearQuery.java
index 217d75f..7958f47 100644
--- a/lucene/core/src/java/org/apache/lucene/search/spans/SpanNearQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/spans/SpanNearQuery.java
@@ -176,20 +176,20 @@ public class SpanNearQuery extends SpanQuery implements Cloneable {
   }
 
   @Override
-  public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+  public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
     List<SpanWeight> subWeights = new ArrayList<>();
     for (SpanQuery q : clauses) {
-      subWeights.add(q.createWeight(searcher, false));
+      subWeights.add(q.createWeight(searcher, false, boost));
     }
-    return new SpanNearWeight(subWeights, searcher, needsScores ? getTermContexts(subWeights) : null);
+    return new SpanNearWeight(subWeights, searcher, needsScores ? getTermContexts(subWeights) : null, boost);
   }
 
   public class SpanNearWeight extends SpanWeight {
 
     final List<SpanWeight> subWeights;
 
-    public SpanNearWeight(List<SpanWeight> subWeights, IndexSearcher searcher, Map<Term, TermContext> terms) throws IOException {
-      super(SpanNearQuery.this, searcher, terms);
+    public SpanNearWeight(List<SpanWeight> subWeights, IndexSearcher searcher, Map<Term, TermContext> terms, float boost) throws IOException {
+      super(SpanNearQuery.this, searcher, terms, boost);
       this.subWeights = subWeights;
     }
 
@@ -295,14 +295,14 @@ public class SpanNearQuery extends SpanQuery implements Cloneable {
     }
 
     @Override
-    public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-      return new SpanGapWeight(searcher);
+    public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+      return new SpanGapWeight(searcher, boost);
     }
 
     private class SpanGapWeight extends SpanWeight {
 
-      SpanGapWeight(IndexSearcher searcher) throws IOException {
-        super(SpanGapQuery.this, searcher, null);
+      SpanGapWeight(IndexSearcher searcher, float boost) throws IOException {
+        super(SpanGapQuery.this, searcher, null, boost);
       }
 
       @Override

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/spans/SpanNotQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/spans/SpanNotQuery.java b/lucene/core/src/java/org/apache/lucene/search/spans/SpanNotQuery.java
index 9b07abf..0984bd9 100644
--- a/lucene/core/src/java/org/apache/lucene/search/spans/SpanNotQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/spans/SpanNotQuery.java
@@ -93,11 +93,11 @@ public final class SpanNotQuery extends SpanQuery {
 
 
   @Override
-  public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    SpanWeight includeWeight = include.createWeight(searcher, false);
-    SpanWeight excludeWeight = exclude.createWeight(searcher, false);
+  public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    SpanWeight includeWeight = include.createWeight(searcher, false, boost);
+    SpanWeight excludeWeight = exclude.createWeight(searcher, false, boost);
     return new SpanNotWeight(searcher, needsScores ? getTermContexts(includeWeight, excludeWeight) : null,
-                                  includeWeight, excludeWeight);
+                                  includeWeight, excludeWeight, boost);
   }
 
   public class SpanNotWeight extends SpanWeight {
@@ -106,8 +106,8 @@ public final class SpanNotQuery extends SpanQuery {
     final SpanWeight excludeWeight;
 
     public SpanNotWeight(IndexSearcher searcher, Map<Term, TermContext> terms,
-                         SpanWeight includeWeight, SpanWeight excludeWeight) throws IOException {
-      super(SpanNotQuery.this, searcher, terms);
+                         SpanWeight includeWeight, SpanWeight excludeWeight, float boost) throws IOException {
+      super(SpanNotQuery.this, searcher, terms, boost);
       this.includeWeight = includeWeight;
       this.excludeWeight = excludeWeight;
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/spans/SpanOrQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/spans/SpanOrQuery.java b/lucene/core/src/java/org/apache/lucene/search/spans/SpanOrQuery.java
index 37e5863..e273dd9 100644
--- a/lucene/core/src/java/org/apache/lucene/search/spans/SpanOrQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/spans/SpanOrQuery.java
@@ -114,20 +114,20 @@ public final class SpanOrQuery extends SpanQuery {
   }
 
   @Override
-  public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+  public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
     List<SpanWeight> subWeights = new ArrayList<>(clauses.size());
     for (SpanQuery q : clauses) {
-      subWeights.add(q.createWeight(searcher, false));
+      subWeights.add(q.createWeight(searcher, false, boost));
     }
-    return new SpanOrWeight(searcher, needsScores ? getTermContexts(subWeights) : null, subWeights);
+    return new SpanOrWeight(searcher, needsScores ? getTermContexts(subWeights) : null, subWeights, boost);
   }
 
   public class SpanOrWeight extends SpanWeight {
 
     final List<SpanWeight> subWeights;
 
-    public SpanOrWeight(IndexSearcher searcher, Map<Term, TermContext> terms, List<SpanWeight> subWeights) throws IOException {
-      super(SpanOrQuery.this, searcher, terms);
+    public SpanOrWeight(IndexSearcher searcher, Map<Term, TermContext> terms, List<SpanWeight> subWeights, float boost) throws IOException {
+      super(SpanOrQuery.this, searcher, terms, boost);
       this.subWeights = subWeights;
     }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/spans/SpanPositionCheckQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/spans/SpanPositionCheckQuery.java b/lucene/core/src/java/org/apache/lucene/search/spans/SpanPositionCheckQuery.java
index 21c3a03..9613ceb 100644
--- a/lucene/core/src/java/org/apache/lucene/search/spans/SpanPositionCheckQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/spans/SpanPositionCheckQuery.java
@@ -67,17 +67,17 @@ public abstract class SpanPositionCheckQuery extends SpanQuery implements Clonea
   protected abstract AcceptStatus acceptPosition(Spans spans) throws IOException;
 
   @Override
-  public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    SpanWeight matchWeight = match.createWeight(searcher, false);
-    return new SpanPositionCheckWeight(matchWeight, searcher, needsScores ? getTermContexts(matchWeight) : null);
+  public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    SpanWeight matchWeight = match.createWeight(searcher, false, boost);
+    return new SpanPositionCheckWeight(matchWeight, searcher, needsScores ? getTermContexts(matchWeight) : null, boost);
   }
 
   public class SpanPositionCheckWeight extends SpanWeight {
 
     final SpanWeight matchWeight;
 
-    public SpanPositionCheckWeight(SpanWeight matchWeight, IndexSearcher searcher, Map<Term, TermContext> terms) throws IOException {
-      super(SpanPositionCheckQuery.this, searcher, terms);
+    public SpanPositionCheckWeight(SpanWeight matchWeight, IndexSearcher searcher, Map<Term, TermContext> terms, float boost) throws IOException {
+      super(SpanPositionCheckQuery.this, searcher, terms, boost);
       this.matchWeight = matchWeight;
     }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/spans/SpanQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/spans/SpanQuery.java b/lucene/core/src/java/org/apache/lucene/search/spans/SpanQuery.java
index 12a1129..965f80e 100644
--- a/lucene/core/src/java/org/apache/lucene/search/spans/SpanQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/spans/SpanQuery.java
@@ -36,7 +36,7 @@ public abstract class SpanQuery extends Query {
   public abstract String getField();
 
   @Override
-  public abstract SpanWeight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException;
+  public abstract SpanWeight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException;
 
   /**
    * Build a map of terms to termcontexts, for use in constructing SpanWeights

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/spans/SpanTermQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/spans/SpanTermQuery.java b/lucene/core/src/java/org/apache/lucene/search/spans/SpanTermQuery.java
index 43e0dcc..2746a0c 100644
--- a/lucene/core/src/java/org/apache/lucene/search/spans/SpanTermQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/spans/SpanTermQuery.java
@@ -64,7 +64,7 @@ public class SpanTermQuery extends SpanQuery {
   public String getField() { return term.field(); }
 
   @Override
-  public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+  public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
     final TermContext context;
     final IndexReaderContext topContext = searcher.getTopReaderContext();
     if (termContext == null || termContext.topReaderContext != topContext) {
@@ -73,15 +73,15 @@ public class SpanTermQuery extends SpanQuery {
     else {
       context = termContext;
     }
-    return new SpanTermWeight(context, searcher, needsScores ? Collections.singletonMap(term, context) : null);
+    return new SpanTermWeight(context, searcher, needsScores ? Collections.singletonMap(term, context) : null, boost);
   }
 
   public class SpanTermWeight extends SpanWeight {
 
     final TermContext termContext;
 
-    public SpanTermWeight(TermContext termContext, IndexSearcher searcher, Map<Term, TermContext> terms) throws IOException {
-      super(SpanTermQuery.this, searcher, terms);
+    public SpanTermWeight(TermContext termContext, IndexSearcher searcher, Map<Term, TermContext> terms, float boost) throws IOException {
+      super(SpanTermQuery.this, searcher, terms, boost);
       this.termContext = termContext;
       assert termContext != null : "TermContext must not be null";
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/spans/SpanWeight.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/spans/SpanWeight.java b/lucene/core/src/java/org/apache/lucene/search/spans/SpanWeight.java
index 8209bd0..c0b231e 100644
--- a/lucene/core/src/java/org/apache/lucene/search/spans/SpanWeight.java
+++ b/lucene/core/src/java/org/apache/lucene/search/spans/SpanWeight.java
@@ -82,14 +82,14 @@ public abstract class SpanWeight extends Weight {
    *                     be null if scores are not required
    * @throws IOException on error
    */
-  public SpanWeight(SpanQuery query, IndexSearcher searcher, Map<Term, TermContext> termContexts) throws IOException {
+  public SpanWeight(SpanQuery query, IndexSearcher searcher, Map<Term, TermContext> termContexts, float boost) throws IOException {
     super(query);
     this.field = query.getField();
     this.similarity = searcher.getSimilarity(termContexts != null);
-    this.simWeight = buildSimWeight(query, searcher, termContexts);
+    this.simWeight = buildSimWeight(query, searcher, termContexts, boost);
   }
 
-  private Similarity.SimWeight buildSimWeight(SpanQuery query, IndexSearcher searcher, Map<Term, TermContext> termContexts) throws IOException {
+  private Similarity.SimWeight buildSimWeight(SpanQuery query, IndexSearcher searcher, Map<Term, TermContext> termContexts, float boost) throws IOException {
     if (termContexts == null || termContexts.size() == 0 || query.getField() == null)
       return null;
     TermStatistics[] termStats = new TermStatistics[termContexts.size()];
@@ -99,7 +99,7 @@ public abstract class SpanWeight extends Weight {
       i++;
     }
     CollectionStatistics collectionStats = searcher.collectionStatistics(query.getField());
-    return searcher.getSimilarity(true).computeWeight(collectionStats, termStats);
+    return searcher.getSimilarity(true).computeWeight(boost, collectionStats, termStats);
   }
 
   /**
@@ -117,18 +117,6 @@ public abstract class SpanWeight extends Weight {
   public abstract Spans getSpans(LeafReaderContext ctx, Postings requiredPostings) throws IOException;
 
   @Override
-  public float getValueForNormalization() throws IOException {
-    return simWeight == null ? 1.0f : simWeight.getValueForNormalization();
-  }
-
-  @Override
-  public void normalize(float queryNorm, float boost) {
-    if (simWeight != null) {
-      simWeight.normalize(queryNorm, boost);
-    }
-  }
-
-  @Override
   public SpanScorer scorer(LeafReaderContext context) throws IOException {
     final Spans spans = getSpans(context, Postings.POSITIONS);
     if (spans == null) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/java/org/apache/lucene/search/spans/SpanWithinQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/spans/SpanWithinQuery.java b/lucene/core/src/java/org/apache/lucene/search/spans/SpanWithinQuery.java
index 6fbfb67..1bb0f50 100644
--- a/lucene/core/src/java/org/apache/lucene/search/spans/SpanWithinQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/spans/SpanWithinQuery.java
@@ -44,18 +44,18 @@ public final class SpanWithinQuery extends SpanContainQuery {
   }
 
   @Override
-  public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    SpanWeight bigWeight = big.createWeight(searcher, false);
-    SpanWeight littleWeight = little.createWeight(searcher, false);
+  public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    SpanWeight bigWeight = big.createWeight(searcher, false, boost);
+    SpanWeight littleWeight = little.createWeight(searcher, false, boost);
     return new SpanWithinWeight(searcher, needsScores ? getTermContexts(bigWeight, littleWeight) : null,
-                                      bigWeight, littleWeight);
+                                      bigWeight, littleWeight, boost);
   }
 
   public class SpanWithinWeight extends SpanContainWeight {
 
     public SpanWithinWeight(IndexSearcher searcher, Map<Term, TermContext> terms,
-                            SpanWeight bigWeight, SpanWeight littleWeight) throws IOException {
-      super(searcher, terms, bigWeight, littleWeight);
+                            SpanWeight bigWeight, SpanWeight littleWeight, float boost) throws IOException {
+      super(searcher, terms, bigWeight, littleWeight, boost);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/test/org/apache/lucene/index/TestCustomNorms.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestCustomNorms.java b/lucene/core/src/test/org/apache/lucene/index/TestCustomNorms.java
index a8d457e..ba3414b 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestCustomNorms.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestCustomNorms.java
@@ -83,11 +83,6 @@ public class TestCustomNorms extends LuceneTestCase {
     Similarity delegate = new ClassicSimilarity();
 
     @Override
-    public float queryNorm(float sumOfSquaredWeights) {
-      return delegate.queryNorm(sumOfSquaredWeights);
-    }
-
-    @Override
     public Similarity get(String field) {
       if (floatTestField.equals(field)) {
         return new FloatEncodingBoostSimilarity();
@@ -105,7 +100,7 @@ public class TestCustomNorms extends LuceneTestCase {
     }
     
     @Override
-    public SimWeight computeWeight(CollectionStatistics collectionStats, TermStatistics... termStats) {
+    public SimWeight computeWeight(float boost, CollectionStatistics collectionStats, TermStatistics... termStats) {
       throw new UnsupportedOperationException();
     }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/test/org/apache/lucene/index/TestIndexSorting.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestIndexSorting.java b/lucene/core/src/test/org/apache/lucene/index/TestIndexSorting.java
index b91bb9b..6528765 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestIndexSorting.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexSorting.java
@@ -992,8 +992,8 @@ public class TestIndexSorting extends LuceneTestCase {
     }
     
     @Override
-    public SimWeight computeWeight(CollectionStatistics collectionStats, TermStatistics... termStats) {
-      return in.computeWeight(collectionStats, termStats);
+    public SimWeight computeWeight(float boost, CollectionStatistics collectionStats, TermStatistics... termStats) {
+      return in.computeWeight(boost, collectionStats, termStats);
     }
     
     @Override

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/test/org/apache/lucene/index/TestMaxTermFrequency.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestMaxTermFrequency.java b/lucene/core/src/test/org/apache/lucene/index/TestMaxTermFrequency.java
index 871ae30..29a7cd1 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestMaxTermFrequency.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestMaxTermFrequency.java
@@ -115,7 +115,6 @@ public class TestMaxTermFrequency extends LuceneTestCase {
       return norm;
     }
 
-    @Override public float queryNorm(float sumOfSquaredWeights) { return 0; }
     @Override public float tf(float freq) { return 0; }
     @Override public float idf(long docFreq, long docCount) { return 0; }
     @Override public float sloppyFreq(int distance) { return 0; }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/test/org/apache/lucene/index/TestNorms.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestNorms.java b/lucene/core/src/test/org/apache/lucene/index/TestNorms.java
index 642540e..ae35963 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestNorms.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestNorms.java
@@ -64,7 +64,6 @@ public class TestNorms extends LuceneTestCase {
       return state.getLength();
     }
 
-    @Override public float queryNorm(float sumOfSquaredWeights) { return 0; }
     @Override public float tf(float freq) { return 0; }
     @Override public float idf(long docFreq, long docCount) { return 0; }
     @Override public float sloppyFreq(int distance) { return 0; }
@@ -156,12 +155,6 @@ public class TestNorms extends LuceneTestCase {
     Similarity delegate = new ClassicSimilarity();
 
     @Override
-    public float queryNorm(float sumOfSquaredWeights) {
-
-      return delegate.queryNorm(sumOfSquaredWeights);
-    }
-
-    @Override
     public Similarity get(String field) {
       if (byteTestField.equals(field)) {
         return new ByteEncodingBoostSimilarity();
@@ -181,7 +174,7 @@ public class TestNorms extends LuceneTestCase {
     }
 
     @Override
-    public SimWeight computeWeight(CollectionStatistics collectionStats, TermStatistics... termStats) {
+    public SimWeight computeWeight(float boost, CollectionStatistics collectionStats, TermStatistics... termStats) {
       throw new UnsupportedOperationException();
     }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/test/org/apache/lucene/index/TestOmitTf.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestOmitTf.java b/lucene/core/src/test/org/apache/lucene/index/TestOmitTf.java
index 3d3384e..3a13d9b 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestOmitTf.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestOmitTf.java
@@ -46,8 +46,6 @@ public class TestOmitTf extends LuceneTestCase {
   public static class SimpleSimilarity extends TFIDFSimilarity {
     @Override public float decodeNormValue(long norm) { return norm; }
     @Override public long encodeNormValue(float f) { return (long) f; }
-    @Override
-    public float queryNorm(float sumOfSquaredWeights) { return 1.0f; }
     @Override public float lengthNorm(FieldInvertState state) { return state.getBoost(); }
     @Override public float tf(float freq) { return freq; }
     @Override public float sloppyFreq(int distance) { return 2.0f; }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/test/org/apache/lucene/index/TestUniqueTermCount.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestUniqueTermCount.java b/lucene/core/src/test/org/apache/lucene/index/TestUniqueTermCount.java
index 575a9bb..b1661ca 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestUniqueTermCount.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestUniqueTermCount.java
@@ -105,7 +105,7 @@ public class TestUniqueTermCount extends LuceneTestCase {
     }
 
     @Override
-    public SimWeight computeWeight(CollectionStatistics collectionStats, TermStatistics... termStats) {
+    public SimWeight computeWeight(float boost, CollectionStatistics collectionStats, TermStatistics... termStats) {
       throw new UnsupportedOperationException();
     }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/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 b46a46e..151d475 100644
--- a/lucene/core/src/test/org/apache/lucene/search/JustCompileSearch.java
+++ b/lucene/core/src/test/org/apache/lucene/search/JustCompileSearch.java
@@ -194,7 +194,7 @@ final class JustCompileSearch {
   static final class JustCompileSimilarity extends Similarity {
 
     @Override
-    public SimWeight computeWeight(CollectionStatistics collectionStats, TermStatistics... termStats) {
+    public SimWeight computeWeight(float boost, CollectionStatistics collectionStats, TermStatistics... termStats) {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 
@@ -258,16 +258,6 @@ final class JustCompileSearch {
     }
 
     @Override
-    public void normalize(float norm, float topLevelBoost) {
-      throw new UnsupportedOperationException(UNSUPPORTED_MSG);
-    }
-
-    @Override
-    public float getValueForNormalization() {
-      throw new UnsupportedOperationException(UNSUPPORTED_MSG);
-    }
-
-    @Override
     public Scorer scorer(LeafReaderContext context) {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/test/org/apache/lucene/search/TestBooleanScorer.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestBooleanScorer.java b/lucene/core/src/test/org/apache/lucene/search/TestBooleanScorer.java
index 42865b7..065def1 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestBooleanScorer.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestBooleanScorer.java
@@ -77,7 +77,7 @@ public class TestBooleanScorer extends LuceneTestCase {
     }
 
     @Override
-    public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+    public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
       return new Weight(CrazyMustUseBulkScorerQuery.this) {
         @Override
         public void extractTerms(Set<Term> terms) {
@@ -90,15 +90,6 @@ public class TestBooleanScorer extends LuceneTestCase {
         }
 
         @Override
-        public float getValueForNormalization() {
-          return 1.0f;
-        }
-
-        @Override
-        public void normalize(float norm, float topLevelBoost) {
-        }
-
-        @Override
         public Scorer scorer(LeafReaderContext context) {
           throw new UnsupportedOperationException();
         }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/test/org/apache/lucene/search/TestComplexExplanations.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestComplexExplanations.java b/lucene/core/src/test/org/apache/lucene/search/TestComplexExplanations.java
index 1a4591d..fce2cd4 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestComplexExplanations.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestComplexExplanations.java
@@ -33,14 +33,11 @@ import org.apache.lucene.search.spans.*;
  */
 public class TestComplexExplanations extends BaseExplanationTestCase {
 
-  /**
-   * Override the Similarity used in our searcher with one that plays
-   * nice with boosts of 0.0
-   */
   @Override
   public void setUp() throws Exception {
     super.setUp();
-    searcher.setSimilarity(createQnorm1Similarity());
+    // TODO: switch to BM25?
+    searcher.setSimilarity(new ClassicSimilarity());
   }
   
   @Override
@@ -49,16 +46,6 @@ public class TestComplexExplanations extends BaseExplanationTestCase {
     super.tearDown();
   }
 
-  // must be static for weight serialization tests 
-  private static ClassicSimilarity createQnorm1Similarity() {
-    return new ClassicSimilarity() {
-        @Override
-        public float queryNorm(float sumOfSquaredWeights) {
-          return 1.0f; // / (float) Math.sqrt(1.0f + sumOfSquaredWeights);
-        }
-      };
-  }
-
   
   public void test1() throws Exception {
     

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/test/org/apache/lucene/search/TestConjunctions.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestConjunctions.java b/lucene/core/src/test/org/apache/lucene/search/TestConjunctions.java
index b6e0356..8b26121 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestConjunctions.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestConjunctions.java
@@ -94,18 +94,9 @@ public class TestConjunctions extends LuceneTestCase {
     }
 
     @Override
-    public SimWeight computeWeight(
+    public SimWeight computeWeight(float boost,
         CollectionStatistics collectionStats, TermStatistics... termStats) {
-      return new SimWeight() {
-        @Override
-        public float getValueForNormalization() {
-          return 1; // we don't care
-        }
-        @Override
-        public void normalize(float queryNorm, float topLevelBoost) {
-          // we don't care
-        }
-      };
+      return new SimWeight() {};
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/test/org/apache/lucene/search/TestConstantScoreQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestConstantScoreQuery.java b/lucene/core/src/test/org/apache/lucene/search/TestConstantScoreQuery.java
index 0a49259..7671cc0 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestConstantScoreQuery.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestConstantScoreQuery.java
@@ -30,7 +30,6 @@ import org.apache.lucene.index.MultiReader;
 import org.apache.lucene.index.RandomIndexWriter;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.search.BooleanClause.Occur;
-import org.apache.lucene.search.similarities.ClassicSimilarity;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.IOUtils;
 import org.apache.lucene.util.LuceneTestCase;
@@ -100,14 +99,6 @@ public class TestConstantScoreQuery extends LuceneTestCase {
       searcher = newSearcher(reader, true, false);
       searcher.setQueryCache(null); // to assert on scorer impl
       
-      // set a similarity that does not normalize our boost away
-      searcher.setSimilarity(new ClassicSimilarity() {
-        @Override
-        public float queryNorm(float sumOfSquaredWeights) {
-          return 1.0f;
-        }
-      });
-      
       final BoostQuery csq1 = new BoostQuery(new ConstantScoreQuery(new TermQuery(new Term ("field", "term"))), 2f);
       final BoostQuery csq2 = new BoostQuery(new ConstantScoreQuery(csq1), 5f);
       
@@ -143,8 +134,8 @@ public class TestConstantScoreQuery extends LuceneTestCase {
     }
     
     @Override
-    public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-      return in.createWeight(searcher, needsScores);
+    public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+      return in.createWeight(searcher, needsScores, boost);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/test/org/apache/lucene/search/TestDocValuesScoring.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestDocValuesScoring.java b/lucene/core/src/test/org/apache/lucene/search/TestDocValuesScoring.java
index 77125b0..de40c0d 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestDocValuesScoring.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestDocValuesScoring.java
@@ -78,11 +78,6 @@ public class TestDocValuesScoring extends LuceneTestCase {
       public Similarity get(String field) {
         return "foo".equals(field) ? fooSim : base;
       }
-
-      @Override
-      public float queryNorm(float sumOfSquaredWeights) {
-        return base.queryNorm(sumOfSquaredWeights);
-      }
     });
     
     // in this case, we searched on field "foo". first document should have 2x the score.
@@ -148,8 +143,8 @@ public class TestDocValuesScoring extends LuceneTestCase {
     }
 
     @Override
-    public SimWeight computeWeight(CollectionStatistics collectionStats, TermStatistics... termStats) {
-      return sim.computeWeight(collectionStats, termStats);
+    public SimWeight computeWeight(float boost, CollectionStatistics collectionStats, TermStatistics... termStats) {
+      return sim.computeWeight(boost, collectionStats, termStats);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/test/org/apache/lucene/search/TestLRUQueryCache.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestLRUQueryCache.java b/lucene/core/src/test/org/apache/lucene/search/TestLRUQueryCache.java
index 48dcdf0..a2e4e1d 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestLRUQueryCache.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestLRUQueryCache.java
@@ -347,8 +347,8 @@ public class TestLRUQueryCache extends LuceneTestCase {
     }
 
     @Override
-    public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-      return new ConstantScoreWeight(this) {
+    public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+      return new ConstantScoreWeight(this, boost) {
         @Override
         public Scorer scorer(LeafReaderContext context) throws IOException {
           return null;
@@ -932,8 +932,8 @@ public class TestLRUQueryCache extends LuceneTestCase {
     int[] i = new int[] {42}; // an array so that clone keeps the reference
 
     @Override
-    public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-      return new ConstantScoreWeight(this) {
+    public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+      return new ConstantScoreWeight(this, boost) {
         @Override
         public Scorer scorer(LeafReaderContext context) throws IOException {
           return null;
@@ -1112,16 +1112,6 @@ public class TestLRUQueryCache extends LuceneTestCase {
     }
 
     @Override
-    public float getValueForNormalization() throws IOException {
-      return in.getValueForNormalization();
-    }
-
-    @Override
-    public void normalize(float norm, float boost) {
-      in.normalize(norm, boost);
-    }
-
-    @Override
     public Scorer scorer(LeafReaderContext context) throws IOException {
       scorerCalled.set(true);
       return in.scorer(context);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/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 c9408f0..19f0be5 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestMinShouldMatch2.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestMinShouldMatch2.java
@@ -89,12 +89,7 @@ public class TestMinShouldMatch2 extends LuceneTestCase {
     r = DirectoryReader.open(dir);
     reader = getOnlyLeafReader(r);
     searcher = new IndexSearcher(reader);
-    searcher.setSimilarity(new ClassicSimilarity() {
-      @Override
-      public float queryNorm(float sumOfSquaredWeights) {
-        return 1; // we disable queryNorm, both for debugging and ease of impl
-      }
-    });
+    searcher.setSimilarity(new ClassicSimilarity());
   }
   
   @AfterClass
@@ -338,11 +333,9 @@ public class TestMinShouldMatch2 extends LuceneTestCase {
           boolean success = ords.add(ord);
           assert success; // no dups
           TermContext context = TermContext.build(reader.getContext(), term);
-          SimWeight w = weight.similarity.computeWeight(
+          SimWeight w = weight.similarity.computeWeight(1f,
                         searcher.collectionStatistics("field"),
                         searcher.termStatistics(term, context));
-          w.getValueForNormalization(); // ignored
-          w.normalize(1F, 1F);
           sims[(int)ord] = weight.similarity.simScorer(w, reader.getContext());
         }
       }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/test/org/apache/lucene/search/TestMultiPhraseQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestMultiPhraseQuery.java b/lucene/core/src/test/org/apache/lucene/search/TestMultiPhraseQuery.java
index 942ac13..262cbf3 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestMultiPhraseQuery.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestMultiPhraseQuery.java
@@ -33,7 +33,6 @@ import org.apache.lucene.index.MultiFields;
 import org.apache.lucene.index.RandomIndexWriter;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.index.TermsEnum;
-import org.apache.lucene.search.similarities.ClassicSimilarity;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.RAMDirectory;
 import org.apache.lucene.util.BytesRef;
@@ -336,32 +335,6 @@ public class TestMultiPhraseQuery extends LuceneTestCase {
   public void testEmptyToString() {
     new MultiPhraseQuery.Builder().build().toString();
   }
-  
-  public void testCustomIDF() throws Exception {
-    Directory indexStore = newDirectory();
-    RandomIndexWriter writer = new RandomIndexWriter(random(), indexStore);
-    add("This is a test", "object", writer);
-    add("a note", "note", writer);
-    
-    IndexReader reader = writer.getReader();
-    IndexSearcher searcher = newSearcher(reader);
-    searcher.setSimilarity(new ClassicSimilarity() { 
-      @Override
-      public Explanation idfExplain(CollectionStatistics collectionStats, TermStatistics termStats[]) {
-        return Explanation.match(10f, "just a test");
-      } 
-    });
-    
-    MultiPhraseQuery.Builder queryBuilder = new MultiPhraseQuery.Builder();
-    queryBuilder.add(new Term[] { new Term("body", "this"), new Term("body", "that") });
-    queryBuilder.add(new Term("body", "is"));
-    Weight weight = queryBuilder.build().createWeight(searcher, true);
-    assertEquals(10f * 10f, weight.getValueForNormalization(), 0.001f);
-
-    writer.close();
-    reader.close();
-    indexStore.close();
-  }
 
   public void testZeroPosIncr() throws IOException {
     Directory dir = new RAMDirectory();

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/test/org/apache/lucene/search/TestMultiTermConstantScore.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestMultiTermConstantScore.java b/lucene/core/src/test/org/apache/lucene/search/TestMultiTermConstantScore.java
index da1c369..69e1e10 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestMultiTermConstantScore.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestMultiTermConstantScore.java
@@ -23,11 +23,9 @@ import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
 import org.apache.lucene.document.FieldType;
 import org.apache.lucene.document.TextField;
-import org.apache.lucene.index.LeafReaderContext;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.RandomIndexWriter;
 import org.apache.lucene.index.Term;
-import org.apache.lucene.search.similarities.ClassicSimilarity;
 import org.apache.lucene.store.Directory;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
@@ -214,76 +212,6 @@ public class TestMultiTermConstantScore extends BaseTestRangeFilter {
     }
   }
 
-  @Test
-  public void testBoost() throws IOException {
-    // NOTE: uses index build in *this* setUp
-
-    IndexSearcher search = newSearcher(reader);
-
-    // test for correct application of query normalization
-    // must use a non score normalizing method for this.
-    
-    search.setSimilarity(new ClassicSimilarity());
-    Query q = csrq("data", "1", "6", T, T);
-    search.search(new BoostQuery(q, 100), new SimpleCollector() {
-      private int base = 0;
-      private Scorer scorer;
-      @Override
-      public void setScorer(Scorer scorer) {
-        this.scorer = scorer;
-      }
-      @Override
-      public void collect(int doc) throws IOException {
-        assertEquals("score for doc " + (doc + base) + " was not correct", 1.0f, scorer.score(), SCORE_COMP_THRESH);
-      }
-      @Override
-      protected void doSetNextReader(LeafReaderContext context) throws IOException {
-        base = context.docBase;
-      }
-      
-      @Override
-      public boolean needsScores() {
-        return true;
-      }
-    });
-
-    //
-    // Ensure that boosting works to score one clause of a query higher
-    // than another.
-    //
-    Query q1 = new BoostQuery(csrq("data", "A", "A", T, T), .1f); // matches document #0
-    Query q2 = csrq("data", "Z", "Z", T, T); // matches document #1
-    BooleanQuery.Builder bq = new BooleanQuery.Builder();
-    bq.add(q1, BooleanClause.Occur.SHOULD);
-    bq.add(q2, BooleanClause.Occur.SHOULD);
-
-    ScoreDoc[] hits = search.search(bq.build(), 1000).scoreDocs;
-    Assert.assertEquals(1, hits[0].doc);
-    Assert.assertEquals(0, hits[1].doc);
-    assertTrue(hits[0].score > hits[1].score);
-
-    q1 = new BoostQuery(csrq("data", "A", "A", T, T, MultiTermQuery.CONSTANT_SCORE_BOOLEAN_REWRITE), .1f); // matches document #0
-    q2 = csrq("data", "Z", "Z", T, T, MultiTermQuery.CONSTANT_SCORE_BOOLEAN_REWRITE); // matches document #1
-    bq = new BooleanQuery.Builder();
-    bq.add(q1, BooleanClause.Occur.SHOULD);
-    bq.add(q2, BooleanClause.Occur.SHOULD);
-
-    hits = search.search(bq.build(), 1000).scoreDocs;
-    Assert.assertEquals(1, hits[0].doc);
-    Assert.assertEquals(0, hits[1].doc);
-    assertTrue(hits[0].score > hits[1].score);
-
-    q1 = new BoostQuery(csrq("data", "A", "A", T, T), 10f); // matches document #0
-    q2 = csrq("data", "Z", "Z", T, T); // matches document #1
-    bq = new BooleanQuery.Builder();
-    bq.add(q1, BooleanClause.Occur.SHOULD);
-    bq.add(q2, BooleanClause.Occur.SHOULD);
-
-    hits = search.search(bq.build(), 1000).scoreDocs;
-    Assert.assertEquals(0, hits[0].doc);
-    Assert.assertEquals(1, hits[1].doc);
-    assertTrue(hits[0].score > hits[1].score);
-  }
 
   @Test
   public void testBooleanOrderUnAffected() throws IOException {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/test/org/apache/lucene/search/TestNeedsScores.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestNeedsScores.java b/lucene/core/src/test/org/apache/lucene/search/TestNeedsScores.java
index 2723ce8..f8fe82c 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestNeedsScores.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestNeedsScores.java
@@ -101,8 +101,8 @@ public class TestNeedsScores extends LuceneTestCase {
     }
 
     @Override
-    public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-      final Weight w = in.createWeight(searcher, needsScores);
+    public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+      final Weight w = in.createWeight(searcher, needsScores, boost);
       return new Weight(AssertNeedsScores.this) {
         @Override
         public void extractTerms(Set<Term> terms) {
@@ -115,16 +115,6 @@ public class TestNeedsScores extends LuceneTestCase {
         }
 
         @Override
-        public float getValueForNormalization() throws IOException {
-          return w.getValueForNormalization();
-        }
-
-        @Override
-        public void normalize(float norm, float topLevelBoost) {
-          w.normalize(norm, topLevelBoost);
-        }
-
-        @Override
         public Scorer scorer(LeafReaderContext context) throws IOException {
           assertEquals("query=" + in, value, needsScores);
           return w.scorer(context);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/test/org/apache/lucene/search/TestPositionIncrement.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestPositionIncrement.java b/lucene/core/src/test/org/apache/lucene/search/TestPositionIncrement.java
index 227b15d..3dd9b18 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestPositionIncrement.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestPositionIncrement.java
@@ -252,7 +252,7 @@ public class TestPositionIncrement extends LuceneTestCase {
       System.out.println("\ngetPayloadSpans test");
     }
     PayloadSpanCollector collector = new PayloadSpanCollector();
-    Spans pspans = snq.createWeight(is, false).getSpans(is.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS);
+    Spans pspans = snq.createWeight(is, false, 1f).getSpans(is.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS);
     while (pspans.nextDoc() != Spans.NO_MORE_DOCS) {
       while (pspans.nextStartPosition() != Spans.NO_MORE_POSITIONS) {
         if (VERBOSE) {
@@ -274,7 +274,7 @@ public class TestPositionIncrement extends LuceneTestCase {
     assertEquals(8, count);
 
     // System.out.println("\ngetSpans test");
-    Spans spans = snq.createWeight(is, false).getSpans(is.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
+    Spans spans = snq.createWeight(is, false, 1f).getSpans(is.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
     count = 0;
     sawZero = false;
     while (spans.nextDoc() != Spans.NO_MORE_DOCS) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/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 0612c00..0043b3d 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestPositiveScoresOnlyCollector.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestPositiveScoresOnlyCollector.java
@@ -94,7 +94,7 @@ public class TestPositiveScoresOnlyCollector extends LuceneTestCase {
     IndexReader ir = writer.getReader();
     writer.close();
     IndexSearcher searcher = newSearcher(ir);
-    Weight fake = new TermQuery(new Term("fake", "weight")).createWeight(searcher, true);
+    Weight fake = new TermQuery(new Term("fake", "weight")).createWeight(searcher, true, 1f);
     Scorer s = new SimpleScorer(fake);
     TopDocsCollector<ScoreDoc> tdc = TopScoreDocCollector.create(scores.length);
     Collector c = new PositiveScoresOnlyCollector(tdc);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/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 c0428f4..8b616b5 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestQueryRescorer.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestQueryRescorer.java
@@ -412,7 +412,7 @@ public class TestQueryRescorer extends LuceneTestCase {
     }
 
     @Override
-    public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+    public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
 
       return new Weight(FixedScoreQuery.this) {
 
@@ -421,15 +421,6 @@ public class TestQueryRescorer extends LuceneTestCase {
         }
 
         @Override
-        public float getValueForNormalization() {
-          return 1.0f;
-        }
-
-        @Override
-        public void normalize(float queryNorm, float topLevelBoost) {
-        }
-
-        @Override
         public Scorer scorer(final LeafReaderContext context) throws IOException {
 
           return new Scorer(null) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/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 7951291..2725603 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestScoreCachingWrappingScorer.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestScoreCachingWrappingScorer.java
@@ -116,7 +116,7 @@ public class TestScoreCachingWrappingScorer extends LuceneTestCase {
     IndexReader ir = writer.getReader();
     writer.close();
     IndexSearcher searcher = newSearcher(ir);
-    Weight fake = new TermQuery(new Term("fake", "weight")).createWeight(searcher, true);
+    Weight fake = new TermQuery(new Term("fake", "weight")).createWeight(searcher, true, 1f);
     Scorer s = new SimpleScorer(fake);
     ScoreCachingCollector scc = new ScoreCachingCollector(scores.length);
     scc.setScorer(s);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/test/org/apache/lucene/search/TestScorerPerf.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestScorerPerf.java b/lucene/core/src/test/org/apache/lucene/search/TestScorerPerf.java
index a7c1ba8..562f2da 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestScorerPerf.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestScorerPerf.java
@@ -149,8 +149,8 @@ public class TestScorerPerf extends LuceneTestCase {
     }
 
     @Override
-    public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-      return new ConstantScoreWeight(this) {
+    public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+      return new ConstantScoreWeight(this, boost) {
         @Override
         public Scorer scorer(LeafReaderContext context) throws IOException {
           return new ConstantScoreScorer(this, score(), new BitSetIterator(docs, docs.approximateCardinality()));

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/test/org/apache/lucene/search/TestSimilarity.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestSimilarity.java b/lucene/core/src/test/org/apache/lucene/search/TestSimilarity.java
index 578126d..966e5da 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestSimilarity.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestSimilarity.java
@@ -39,8 +39,6 @@ import org.apache.lucene.document.Document;
 public class TestSimilarity extends LuceneTestCase {
   
   public static class SimpleSimilarity extends ClassicSimilarity {
-    @Override
-    public float queryNorm(float sumOfSquaredWeights) { return 1.0f; }
     @Override public float lengthNorm(FieldInvertState state) { return state.getBoost(); }
     @Override public float tf(float freq) { return freq; }
     @Override public float sloppyFreq(int distance) { return 2.0f; }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/test/org/apache/lucene/search/TestSimilarityProvider.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestSimilarityProvider.java b/lucene/core/src/test/org/apache/lucene/search/TestSimilarityProvider.java
index 4f1ec8c..83144b1 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestSimilarityProvider.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestSimilarityProvider.java
@@ -115,11 +115,6 @@ public class TestSimilarityProvider extends LuceneTestCase {
     }
 
     @Override
-    public float queryNorm(float sumOfSquaredWeights) {
-      return 1f;
-    }
-
-    @Override
     public float lengthNorm(FieldInvertState state) {
       return 1f;
     }
@@ -156,11 +151,6 @@ public class TestSimilarityProvider extends LuceneTestCase {
     public float decodeNormValue(long norm) {
       return norm;
     }
-
-    @Override
-    public float queryNorm(float sumOfSquaredWeights) {
-      return 1f;
-    }
     
     @Override
     public float lengthNorm(FieldInvertState state) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/test/org/apache/lucene/search/TestSortRandom.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestSortRandom.java b/lucene/core/src/test/org/apache/lucene/search/TestSortRandom.java
index 32bce9e..2bccaff 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestSortRandom.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestSortRandom.java
@@ -229,8 +229,8 @@ public class TestSortRandom extends LuceneTestCase {
     }
 
     @Override
-    public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-      return new ConstantScoreWeight(this) {
+    public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+      return new ConstantScoreWeight(this, boost) {
         @Override
         public Scorer scorer(LeafReaderContext context) throws IOException {
           Random random = new Random(context.docBase ^ seed);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/test/org/apache/lucene/search/similarities/TestSimilarityBase.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/similarities/TestSimilarityBase.java b/lucene/core/src/test/org/apache/lucene/search/similarities/TestSimilarityBase.java
index 829d30c..aec55de 100644
--- a/lucene/core/src/test/org/apache/lucene/search/similarities/TestSimilarityBase.java
+++ b/lucene/core/src/test/org/apache/lucene/search/similarities/TestSimilarityBase.java
@@ -172,7 +172,7 @@ public class TestSimilarityBase extends LuceneTestCase {
   
   /** Creates the default statistics object that the specific tests modify. */
   private BasicStats createStats() {
-    BasicStats stats = new BasicStats("spoof");
+    BasicStats stats = new BasicStats("spoof", 1f);
     stats.setNumberOfDocuments(NUMBER_OF_DOCUMENTS);
     stats.setNumberOfFieldTokens(NUMBER_OF_FIELD_TOKENS);
     stats.setAvgFieldLength(AVG_FIELD_LENGTH);
@@ -197,9 +197,9 @@ public class TestSimilarityBase extends LuceneTestCase {
   private void unitTestCore(BasicStats stats, float freq, int docLen) {
     for (SimilarityBase sim : sims) {
       BasicStats realStats = (BasicStats) sim.computeWeight(
+          stats.getBoost(),
           toCollectionStats(stats), 
           toTermStats(stats));
-      realStats.normalize(1f, stats.getBoost());
       float score = sim.score(realStats, freq, docLen);
       float explScore = sim.explain(
           realStats, 1, Explanation.match(freq, "freq"), docLen).getValue();
@@ -530,9 +530,9 @@ public class TestSimilarityBase extends LuceneTestCase {
   private void correctnessTestCore(SimilarityBase sim, float gold) {
     BasicStats stats = createStats();
     BasicStats realStats = (BasicStats) sim.computeWeight(
+        stats.getBoost(),
         toCollectionStats(stats), 
         toTermStats(stats));
-    realStats.normalize(1f, stats.getBoost());
     float score = sim.score(realStats, FREQ, DOC_LEN);
     assertEquals(
         sim.toString() + " score not correct.", gold, score, FLOAT_EPSILON);
@@ -648,7 +648,7 @@ public class TestSimilarityBase extends LuceneTestCase {
           continue;
         }
       }
-      BasicStats stats = (BasicStats) sim.computeWeight(collectionStats, termStats);
+      BasicStats stats = (BasicStats) sim.computeWeight(1f, collectionStats, termStats);
       for (float tf = 1.0f; tf <= 10.0f; tf += 1.0f) {
         for (int i = 0; i < 256; i++) {
           float len = sim.decodeNormValue((byte) i);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/test/org/apache/lucene/search/spans/JustCompileSearchSpans.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/spans/JustCompileSearchSpans.java b/lucene/core/src/test/org/apache/lucene/search/spans/JustCompileSearchSpans.java
index 6e6102f..b1f87dd 100644
--- a/lucene/core/src/test/org/apache/lucene/search/spans/JustCompileSearchSpans.java
+++ b/lucene/core/src/test/org/apache/lucene/search/spans/JustCompileSearchSpans.java
@@ -93,7 +93,7 @@ final class JustCompileSearchSpans {
     }
 
     @Override
-    public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+    public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
       throw new UnsupportedOperationException(UNSUPPORTED_MSG);
     }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/test/org/apache/lucene/search/spans/TestFieldMaskingSpanQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/spans/TestFieldMaskingSpanQuery.java b/lucene/core/src/test/org/apache/lucene/search/spans/TestFieldMaskingSpanQuery.java
index c2e2c7d..8dccfcb 100644
--- a/lucene/core/src/test/org/apache/lucene/search/spans/TestFieldMaskingSpanQuery.java
+++ b/lucene/core/src/test/org/apache/lucene/search/spans/TestFieldMaskingSpanQuery.java
@@ -142,7 +142,7 @@ public class TestFieldMaskingSpanQuery extends LuceneTestCase {
     QueryUtils.checkEqual(q, qr);
 
     Set<Term> terms = new HashSet<>();
-    qr.createWeight(searcher, false).extractTerms(terms);
+    qr.createWeight(searcher, false, 1f).extractTerms(terms);
     assertEquals(1, terms.size());
   }
   
@@ -162,7 +162,7 @@ public class TestFieldMaskingSpanQuery extends LuceneTestCase {
     QueryUtils.checkUnequal(q, qr);
 
     Set<Term> terms = new HashSet<>();
-    qr.createWeight(searcher, false).extractTerms(terms);
+    qr.createWeight(searcher, false, 1f).extractTerms(terms);
     assertEquals(2, terms.size());
   }
   
@@ -176,7 +176,7 @@ public class TestFieldMaskingSpanQuery extends LuceneTestCase {
     QueryUtils.checkEqual(q, qr);
 
     HashSet<Term> set = new HashSet<>();
-    qr.createWeight(searcher, true).extractTerms(set);
+    qr.createWeight(searcher, true, 1f).extractTerms(set);
     assertEquals(2, set.size());
   }
   
@@ -252,7 +252,7 @@ public class TestFieldMaskingSpanQuery extends LuceneTestCase {
     SpanQuery q  = new SpanOrQuery(q1, new FieldMaskingSpanQuery(q2, "gender"));
     check(q, new int[] { 0, 1, 2, 3, 4 });
 
-    Spans span = q.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
+    Spans span = q.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
     assertNext(span, 0,0,1);
     assertNext(span, 1,0,1);
     assertNext(span, 1,1,2);
@@ -274,8 +274,8 @@ public class TestFieldMaskingSpanQuery extends LuceneTestCase {
     check(qA, new int[] { 0, 1, 2, 4 });
     check(qB, new int[] { 0, 1, 2, 4 });
   
-    Spans spanA = qA.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
-    Spans spanB = qB.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
+    Spans spanA = qA.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
+    Spans spanB = qB.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
     
     while (spanA.nextDoc() != Spans.NO_MORE_DOCS) {
       assertNotSame("spanB not still going", Spans.NO_MORE_DOCS, spanB.nextDoc());
@@ -300,7 +300,7 @@ public class TestFieldMaskingSpanQuery extends LuceneTestCase {
         new FieldMaskingSpanQuery(qB, "id") }, -1, false );
     check(q, new int[] { 0, 1, 2, 3 });
 
-    Spans span = q.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
+    Spans span = q.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
     assertNext(span, 0,0,1);
     assertNext(span, 1,1,2);
     assertNext(span, 2,0,1);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/test/org/apache/lucene/search/spans/TestNearSpansOrdered.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/spans/TestNearSpansOrdered.java b/lucene/core/src/test/org/apache/lucene/search/spans/TestNearSpansOrdered.java
index d9c003a..6b491fe 100644
--- a/lucene/core/src/test/org/apache/lucene/search/spans/TestNearSpansOrdered.java
+++ b/lucene/core/src/test/org/apache/lucene/search/spans/TestNearSpansOrdered.java
@@ -121,7 +121,7 @@ public class TestNearSpansOrdered extends LuceneTestCase {
   
   public void testNearSpansNext() throws Exception {
     SpanNearQuery q = makeQuery();
-    Spans span = q.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
+    Spans span = q.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
     assertNext(span,0,0,3);
     assertNext(span,1,0,4);
     assertFinished(span);
@@ -134,7 +134,7 @@ public class TestNearSpansOrdered extends LuceneTestCase {
    */
   public void testNearSpansAdvanceLikeNext() throws Exception {
     SpanNearQuery q = makeQuery();
-    Spans span = q.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
+    Spans span = q.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
     assertEquals(0, span.advance(0));
     assertEquals(0, span.nextStartPosition());
     assertEquals(s(0,0,3), s(span));
@@ -146,7 +146,7 @@ public class TestNearSpansOrdered extends LuceneTestCase {
   
   public void testNearSpansNextThenAdvance() throws Exception {
     SpanNearQuery q = makeQuery();
-    Spans span = q.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
+    Spans span = q.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
     assertNotSame(Spans.NO_MORE_DOCS, span.nextDoc());
     assertEquals(0, span.nextStartPosition());
     assertEquals(s(0,0,3), s(span));
@@ -158,7 +158,7 @@ public class TestNearSpansOrdered extends LuceneTestCase {
   
   public void testNearSpansNextThenAdvancePast() throws Exception {
     SpanNearQuery q = makeQuery();
-    Spans span = q.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
+    Spans span = q.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
     assertNotSame(Spans.NO_MORE_DOCS, span.nextDoc());
     assertEquals(0, span.nextStartPosition());
     assertEquals(s(0,0,3), s(span));
@@ -167,13 +167,13 @@ public class TestNearSpansOrdered extends LuceneTestCase {
   
   public void testNearSpansAdvancePast() throws Exception {
     SpanNearQuery q = makeQuery();
-    Spans span = q.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
+    Spans span = q.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
     assertEquals(Spans.NO_MORE_DOCS, span.advance(2));
   }
   
   public void testNearSpansAdvanceTo0() throws Exception {
     SpanNearQuery q = makeQuery();
-    Spans span = q.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
+    Spans span = q.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
     assertEquals(0, span.advance(0));
     assertEquals(0, span.nextStartPosition());
     assertEquals(s(0,0,3), s(span));
@@ -181,7 +181,7 @@ public class TestNearSpansOrdered extends LuceneTestCase {
 
   public void testNearSpansAdvanceTo1() throws Exception {
     SpanNearQuery q = makeQuery();
-    Spans span = q.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
+    Spans span = q.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
     assertEquals(1, span.advance(1));
     assertEquals(0, span.nextStartPosition());
     assertEquals(s(1,0,4), s(span));
@@ -220,7 +220,7 @@ public class TestNearSpansOrdered extends LuceneTestCase {
         new SpanOrQuery(new SpanTermQuery(new Term(FIELD, "w1")), new SpanTermQuery(new Term(FIELD, "w2"))),
         new SpanTermQuery(new Term(FIELD, "w4"))
     }, 10, true);
-    Spans spans = q.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
+    Spans spans = q.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
     assertNext(spans,0,0,4);
     assertNext(spans,0,1,4);
     assertFinished(spans);
@@ -230,7 +230,7 @@ public class TestNearSpansOrdered extends LuceneTestCase {
     SpanNearQuery q = new SpanNearQuery(new SpanQuery[]{
         new SpanTermQuery(new Term(FIELD, "t1")), new SpanTermQuery(new Term(FIELD, "t2"))
     }, 1, true);
-    Spans spans = q.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
+    Spans spans = q.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
     assertNext(spans,4,0,2);
     assertFinished(spans);
   }
@@ -239,7 +239,7 @@ public class TestNearSpansOrdered extends LuceneTestCase {
     SpanNearQuery q = new SpanNearQuery(new SpanQuery[]{
         new SpanTermQuery(new Term(FIELD, "t2")), new SpanTermQuery(new Term(FIELD, "t1"))
     }, 1, true);
-    Spans spans = q.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
+    Spans spans = q.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
     assertNext(spans,4,1,4);
     assertNext(spans,4,2,4);
     assertFinished(spans);
@@ -263,7 +263,7 @@ public class TestNearSpansOrdered extends LuceneTestCase {
         .addGap(1)
         .addClause(new SpanTermQuery(new Term(FIELD, "w2")))
         .build();
-    Spans spans = q.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
+    Spans spans = q.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
     assertNext(spans, 1, 0, 3);
     assertNext(spans, 2, 0, 3);
     assertFinished(spans);
@@ -276,7 +276,7 @@ public class TestNearSpansOrdered extends LuceneTestCase {
         .addClause(new SpanTermQuery(new Term(FIELD, "w3")))
         .setSlop(1)
         .build();
-    spans = q.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
+    spans = q.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
     assertNext(spans, 2, 0, 5);
     assertNext(spans, 3, 0, 6);
     assertFinished(spans);
@@ -288,7 +288,7 @@ public class TestNearSpansOrdered extends LuceneTestCase {
         .addGap(2)
         .addClause(new SpanTermQuery(new Term(FIELD, "g")))
         .build();
-    Spans spans = q.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
+    Spans spans = q.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
     assertNext(spans, 5, 0, 4);
     assertNext(spans, 5, 9, 13);
     assertFinished(spans);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/test/org/apache/lucene/search/spans/TestSpanCollection.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/spans/TestSpanCollection.java b/lucene/core/src/test/org/apache/lucene/search/spans/TestSpanCollection.java
index 8e45482..2b42a76 100644
--- a/lucene/core/src/test/org/apache/lucene/search/spans/TestSpanCollection.java
+++ b/lucene/core/src/test/org/apache/lucene/search/spans/TestSpanCollection.java
@@ -119,7 +119,7 @@ public class TestSpanCollection extends LuceneTestCase {
     SpanNearQuery q7 = new SpanNearQuery(new SpanQuery[]{q1, q6}, 1, true);
 
     TermCollector collector = new TermCollector();
-    Spans spans = q7.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
+    Spans spans = q7.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
     assertEquals(0, spans.advance(0));
     spans.nextStartPosition();
     checkCollectedTerms(spans, collector, new Term(FIELD, "w1"), new Term(FIELD, "w2"), new Term(FIELD, "w3"));
@@ -139,7 +139,7 @@ public class TestSpanCollection extends LuceneTestCase {
     SpanOrQuery orQuery = new SpanOrQuery(q2, q3);
 
     TermCollector collector = new TermCollector();
-    Spans spans = orQuery.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
+    Spans spans = orQuery.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
 
     assertEquals(1, spans.advance(1));
     spans.nextStartPosition();
@@ -169,7 +169,7 @@ public class TestSpanCollection extends LuceneTestCase {
     SpanNotQuery notq = new SpanNotQuery(nq, q3);
 
     TermCollector collector = new TermCollector();
-    Spans spans = notq.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
+    Spans spans = notq.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
 
     assertEquals(2, spans.advance(2));
     spans.nextStartPosition();

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/test/org/apache/lucene/search/spans/TestSpanContainQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/spans/TestSpanContainQuery.java b/lucene/core/src/test/org/apache/lucene/search/spans/TestSpanContainQuery.java
index 3e50183..c2c2338 100644
--- a/lucene/core/src/test/org/apache/lucene/search/spans/TestSpanContainQuery.java
+++ b/lucene/core/src/test/org/apache/lucene/search/spans/TestSpanContainQuery.java
@@ -72,7 +72,7 @@ public class TestSpanContainQuery extends LuceneTestCase {
   }
 
   Spans makeSpans(SpanQuery sq) throws Exception {
-    return sq.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
+    return sq.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
   }
 
   void tstEqualSpans(String mes, SpanQuery expectedQ, SpanQuery actualQ) throws Exception {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/core/src/test/org/apache/lucene/search/spans/TestSpans.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/spans/TestSpans.java b/lucene/core/src/test/org/apache/lucene/search/spans/TestSpans.java
index 2983301..2d5e05c 100644
--- a/lucene/core/src/test/org/apache/lucene/search/spans/TestSpans.java
+++ b/lucene/core/src/test/org/apache/lucene/search/spans/TestSpans.java
@@ -202,7 +202,7 @@ public class TestSpans extends LuceneTestCase {
   public void testSpanNearOrderedOverlap() throws Exception {
     final SpanQuery query = spanNearOrderedQuery(field, 1, "t1", "t2", "t3");
     
-    Spans spans = query.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
+    Spans spans = query.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
 
     assertEquals("first doc", 11, spans.nextDoc());
     assertEquals("first start", 0, spans.nextStartPosition());
@@ -217,7 +217,7 @@ public class TestSpans extends LuceneTestCase {
   public void testSpanNearUnOrdered() throws Exception {
     //See http://www.gossamer-threads.com/lists/lucene/java-dev/52270 for discussion about this test
     SpanQuery senq = spanNearUnorderedQuery(field, 0, "u1", "u2");
-    Spans spans = senq.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
+    Spans spans = senq.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
     assertNext(spans, 4, 1, 3);
     assertNext(spans, 5, 2, 4);
     assertNext(spans, 8, 2, 4);
@@ -226,7 +226,7 @@ public class TestSpans extends LuceneTestCase {
     assertFinished(spans);
 
     senq = spanNearUnorderedQuery(1, senq, spanTermQuery(field, "u2")); 
-    spans = senq.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
+    spans = senq.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
     assertNext(spans, 4, 0, 3);
     assertNext(spans, 4, 1, 3); // unordered spans can be subsets
     assertNext(spans, 5, 0, 4);
@@ -240,7 +240,7 @@ public class TestSpans extends LuceneTestCase {
   }
 
   private Spans orSpans(String[] terms) throws Exception {
-    return spanOrQuery(field, terms).createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
+    return spanOrQuery(field, terms).createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
   }
 
   public void testSpanOrEmpty() throws Exception {
@@ -444,7 +444,7 @@ public class TestSpans extends LuceneTestCase {
      SpanQuery iq = spanTermQuery(field, include);
      SpanQuery eq = spanTermQuery(field, exclude);
      SpanQuery snq = spanNotQuery(iq, eq, pre, post);
-     Spans spans = snq.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
+     Spans spans = snq.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
 
      int i = 0;
      if (spans != null) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/facet/src/java/org/apache/lucene/facet/DrillSidewaysQuery.java
----------------------------------------------------------------------
diff --git a/lucene/facet/src/java/org/apache/lucene/facet/DrillSidewaysQuery.java b/lucene/facet/src/java/org/apache/lucene/facet/DrillSidewaysQuery.java
index 48883ea..bb9db7a 100644
--- a/lucene/facet/src/java/org/apache/lucene/facet/DrillSidewaysQuery.java
+++ b/lucene/facet/src/java/org/apache/lucene/facet/DrillSidewaysQuery.java
@@ -79,8 +79,8 @@ class DrillSidewaysQuery extends Query {
   }
   
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    final Weight baseWeight = baseQuery.createWeight(searcher, needsScores);
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    final Weight baseWeight = baseQuery.createWeight(searcher, needsScores, boost);
     final Weight[] drillDowns = new Weight[drillDownQueries.length];
     for(int dim=0;dim<drillDownQueries.length;dim++) {
       drillDowns[dim] = searcher.createNormalizedWeight(drillDownQueries[dim], false);
@@ -96,16 +96,6 @@ class DrillSidewaysQuery extends Query {
       }
 
       @Override
-      public float getValueForNormalization() throws IOException {
-        return baseWeight.getValueForNormalization();
-      }
-
-      @Override
-      public void normalize(float norm, float boost) {
-        baseWeight.normalize(norm, boost);
-      }
-
-      @Override
       public Scorer scorer(LeafReaderContext context) throws IOException {
         // We can only run as a top scorer:
         throw new UnsupportedOperationException();

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/facet/src/java/org/apache/lucene/facet/range/DoubleRange.java
----------------------------------------------------------------------
diff --git a/lucene/facet/src/java/org/apache/lucene/facet/range/DoubleRange.java b/lucene/facet/src/java/org/apache/lucene/facet/range/DoubleRange.java
index 8893c65..2203be3 100644
--- a/lucene/facet/src/java/org/apache/lucene/facet/range/DoubleRange.java
+++ b/lucene/facet/src/java/org/apache/lucene/facet/range/DoubleRange.java
@@ -137,12 +137,12 @@ public final class DoubleRange extends Range {
     }
 
     @Override
-    public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+    public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
       final Weight fastMatchWeight = fastMatchQuery == null
           ? null
-          : searcher.createWeight(fastMatchQuery, false);
+          : searcher.createWeight(fastMatchQuery, false, 1f);
 
-      return new ConstantScoreWeight(this) {
+      return new ConstantScoreWeight(this, boost) {
         @Override
         public Scorer scorer(LeafReaderContext context) throws IOException {
           final int maxDoc = context.reader().maxDoc();

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/facet/src/java/org/apache/lucene/facet/range/LongRange.java
----------------------------------------------------------------------
diff --git a/lucene/facet/src/java/org/apache/lucene/facet/range/LongRange.java b/lucene/facet/src/java/org/apache/lucene/facet/range/LongRange.java
index 46ee00b..9c12ecd 100644
--- a/lucene/facet/src/java/org/apache/lucene/facet/range/LongRange.java
+++ b/lucene/facet/src/java/org/apache/lucene/facet/range/LongRange.java
@@ -129,12 +129,12 @@ public final class LongRange extends Range {
     }
 
     @Override
-    public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+    public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
       final Weight fastMatchWeight = fastMatchQuery == null
           ? null
-          : searcher.createWeight(fastMatchQuery, false);
+          : searcher.createWeight(fastMatchQuery, false, 1f);
 
-      return new ConstantScoreWeight(this) {
+      return new ConstantScoreWeight(this, boost) {
         @Override
         public Scorer scorer(LeafReaderContext context) throws IOException {
           final int maxDoc = context.reader().maxDoc();

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/facet/src/test/org/apache/lucene/facet/TestDrillSideways.java
----------------------------------------------------------------------
diff --git a/lucene/facet/src/test/org/apache/lucene/facet/TestDrillSideways.java b/lucene/facet/src/test/org/apache/lucene/facet/TestDrillSideways.java
index ebb8fb6..7531ec7 100644
--- a/lucene/facet/src/test/org/apache/lucene/facet/TestDrillSideways.java
+++ b/lucene/facet/src/test/org/apache/lucene/facet/TestDrillSideways.java
@@ -650,8 +650,8 @@ public class TestDrillSideways extends FacetTestCase {
         filter = new Query() {
 
           @Override
-          public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-            return new RandomAccessWeight(this) {
+          public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+            return new RandomAccessWeight(this, boost) {
               @Override
               protected Bits getMatchingDocs(final LeafReaderContext context) throws IOException {
                 return new Bits() {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/facet/src/test/org/apache/lucene/facet/range/TestRangeFacetCounts.java
----------------------------------------------------------------------
diff --git a/lucene/facet/src/test/org/apache/lucene/facet/range/TestRangeFacetCounts.java b/lucene/facet/src/test/org/apache/lucene/facet/range/TestRangeFacetCounts.java
index b9ff1ce..7250ef4 100644
--- a/lucene/facet/src/test/org/apache/lucene/facet/range/TestRangeFacetCounts.java
+++ b/lucene/facet/src/test/org/apache/lucene/facet/range/TestRangeFacetCounts.java
@@ -678,8 +678,8 @@ public class TestRangeFacetCounts extends FacetTestCase {
     }
 
     @Override
-    public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-      final Weight in = this.in.createWeight(searcher, needsScores);
+    public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+      final Weight in = this.in.createWeight(searcher, needsScores, boost);
       return new Weight(in.getQuery()) {
 
         @Override
@@ -693,16 +693,6 @@ public class TestRangeFacetCounts extends FacetTestCase {
         }
 
         @Override
-        public float getValueForNormalization() throws IOException {
-          return in.getValueForNormalization();
-        }
-
-        @Override
-        public void normalize(float norm, float topLevelBoost) {
-          in.normalize(norm, topLevelBoost);
-        }
-
-        @Override
         public Scorer scorer(LeafReaderContext context) throws IOException {
           used.set(true);
           return in.scorer(context);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.java
----------------------------------------------------------------------
diff --git a/lucene/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.java b/lucene/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.java
index 7507bdd..837201e 100644
--- a/lucene/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.java
+++ b/lucene/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.java
@@ -288,10 +288,10 @@ public class WeightedSpanTermExtractor {
       for (final String field : fieldNames) {
         final SpanQuery rewrittenQuery = (SpanQuery) spanQuery.rewrite(getLeafContext().reader());
         queries.put(field, rewrittenQuery);
-        rewrittenQuery.createWeight(searcher, false).extractTerms(nonWeightedTerms);
+        rewrittenQuery.createWeight(searcher, false, boost).extractTerms(nonWeightedTerms);
       }
     } else {
-      spanQuery.createWeight(searcher, false).extractTerms(nonWeightedTerms);
+      spanQuery.createWeight(searcher, false, boost).extractTerms(nonWeightedTerms);
     }
 
     List<PositionSpan> spanPositions = new ArrayList<>();

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/join/src/java/org/apache/lucene/search/join/GlobalOrdinalsQuery.java
----------------------------------------------------------------------
diff --git a/lucene/join/src/java/org/apache/lucene/search/join/GlobalOrdinalsQuery.java b/lucene/join/src/java/org/apache/lucene/search/join/GlobalOrdinalsQuery.java
index 6c380b4..83e01e4 100644
--- a/lucene/join/src/java/org/apache/lucene/search/join/GlobalOrdinalsQuery.java
+++ b/lucene/join/src/java/org/apache/lucene/search/join/GlobalOrdinalsQuery.java
@@ -60,8 +60,8 @@ final class GlobalOrdinalsQuery extends Query {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    return new W(this, toQuery.createWeight(searcher, false));
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    return new W(this, toQuery.createWeight(searcher, false, 1f), boost);
   }
 
   @Override
@@ -98,8 +98,8 @@ final class GlobalOrdinalsQuery extends Query {
 
     private final Weight approximationWeight;
 
-    W(Query query, Weight approximationWeight) {
-      super(query);
+    W(Query query, Weight approximationWeight, float boost) {
+      super(query, boost);
       this.approximationWeight = approximationWeight;
     }
 


[3/5] lucene-solr:master: LUCENE-7368: Remove queryNorm.

Posted by jp...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/join/src/java/org/apache/lucene/search/join/GlobalOrdinalsWithScoreQuery.java
----------------------------------------------------------------------
diff --git a/lucene/join/src/java/org/apache/lucene/search/join/GlobalOrdinalsWithScoreQuery.java b/lucene/join/src/java/org/apache/lucene/search/join/GlobalOrdinalsWithScoreQuery.java
index 289f833..8781d1e 100644
--- a/lucene/join/src/java/org/apache/lucene/search/join/GlobalOrdinalsWithScoreQuery.java
+++ b/lucene/join/src/java/org/apache/lucene/search/join/GlobalOrdinalsWithScoreQuery.java
@@ -61,8 +61,8 @@ final class GlobalOrdinalsWithScoreQuery extends Query {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    return new W(this, toQuery.createWeight(searcher, false));
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    return new W(this, toQuery.createWeight(searcher, false, 1f));
   }
 
   @Override
@@ -142,17 +142,6 @@ final class GlobalOrdinalsWithScoreQuery extends Query {
     }
 
     @Override
-    public float getValueForNormalization() throws IOException {
-      return 1f;
-    }
-
-    @Override
-    public void normalize(float norm, float boost) {
-      // no normalization, we ignore the normalization process
-      // and produce scores based on the join
-    }
-
-    @Override
     public Scorer scorer(LeafReaderContext context) throws IOException {
       SortedDocValues values = DocValues.getSorted(context.reader(), joinField);
       if (values == null) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/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 d83bc8f..5018e97 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
@@ -118,8 +118,7 @@ abstract class PointInSetIncludingScoreQuery extends Query {
   }
 
   @Override
-  public final Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    final Weight originalWeight = originalQuery.createWeight(searcher, needsScores);
+  public final Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
     return new Weight(this) {
 
       @Override
@@ -139,16 +138,6 @@ abstract class PointInSetIncludingScoreQuery extends Query {
       }
 
       @Override
-      public float getValueForNormalization() throws IOException {
-        return originalWeight.getValueForNormalization();
-      }
-
-      @Override
-      public void normalize(float norm, float boost) {
-        originalWeight.normalize(norm, boost);
-      }
-
-      @Override
       public Scorer scorer(LeafReaderContext context) throws IOException {
         LeafReader reader = context.reader();
         PointValues values = reader.getPointValues();

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/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 94df35b..3b03bd3 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
@@ -106,8 +106,7 @@ class TermsIncludingScoreQuery extends Query {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    final Weight originalWeight = originalQuery.createWeight(searcher, needsScores);
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
     return new Weight(TermsIncludingScoreQuery.this) {
 
       @Override
@@ -134,16 +133,6 @@ class TermsIncludingScoreQuery extends Query {
       }
 
       @Override
-      public float getValueForNormalization() throws IOException {
-        return originalWeight.getValueForNormalization();
-      }
-
-      @Override
-      public void normalize(float norm, float boost) {
-        originalWeight.normalize(norm, boost);
-      }
-
-      @Override
       public Scorer scorer(LeafReaderContext context) throws IOException {
         Terms terms = context.reader().terms(field);
         if (terms == null) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/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 f3d487f..b925b31 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
@@ -81,8 +81,8 @@ public class ToChildBlockJoinQuery extends Query {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    return new ToChildBlockJoinWeight(this, parentQuery.createWeight(searcher, needsScores), parentsFilter, needsScores);
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    return new ToChildBlockJoinWeight(this, parentQuery.createWeight(searcher, needsScores, boost), parentsFilter, needsScores);
   }
 
   /** Return our parent query. */
@@ -107,16 +107,6 @@ public class ToChildBlockJoinQuery extends Query {
       parentWeight.extractTerms(terms);
     }
 
-    @Override
-    public float getValueForNormalization() throws IOException {
-      return parentWeight.getValueForNormalization();
-    }
-
-    @Override
-    public void normalize(float norm, float boost) {
-      parentWeight.normalize(norm, boost);
-    }
-
     // NOTE: acceptDocs applies (and is checked) only in the
     // child document space
     @Override

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/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 e4e099f..d5745d9 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
@@ -115,8 +115,8 @@ public class ToParentBlockJoinQuery extends Query {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    return new BlockJoinWeight(this, childQuery.createWeight(searcher, needsScores), parentsFilter, needsScores ? scoreMode : ScoreMode.None);
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    return new BlockJoinWeight(this, childQuery.createWeight(searcher, needsScores, boost), parentsFilter, needsScores ? scoreMode : ScoreMode.None);
   }
   
   /** Return our child query. */
@@ -141,16 +141,6 @@ public class ToParentBlockJoinQuery extends Query {
       childWeight.extractTerms(terms);
     }
 
-    @Override
-    public float getValueForNormalization() throws IOException {
-      return childWeight.getValueForNormalization();
-    }
-
-    @Override
-    public void normalize(float norm, float boost) {
-      childWeight.normalize(norm, boost);
-    }
-
     // NOTE: acceptDocs applies (and is checked) only in the
     // parent document space
     @Override

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java
----------------------------------------------------------------------
diff --git a/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java b/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java
index 3fc6485..af9ff5c 100644
--- a/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java
+++ b/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java
@@ -118,13 +118,13 @@ public class TestBlockJoin extends LuceneTestCase {
     IndexReader indexReader = DirectoryReader.open(directory);
     IndexSearcher indexSearcher = new IndexSearcher(indexReader);
 
-    Weight weight = toParentBlockJoinQuery.createWeight(indexSearcher, false);
+    Weight weight = toParentBlockJoinQuery.createWeight(indexSearcher, false, 1f);
     Set<Term> terms = new HashSet<>();
     weight.extractTerms(terms);
     Term[] termArr =terms.toArray(new Term[0]);
     assertEquals(1, termArr.length);
 
-    weight = toChildBlockJoinQuery.createWeight(indexSearcher, false);
+    weight = toChildBlockJoinQuery.createWeight(indexSearcher, false, 1f);
     terms = new HashSet<>();
     weight.extractTerms(terms);
     termArr =terms.toArray(new Term[0]);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/join/src/test/org/apache/lucene/search/join/TestJoinUtil.java
----------------------------------------------------------------------
diff --git a/lucene/join/src/test/org/apache/lucene/search/join/TestJoinUtil.java b/lucene/join/src/test/org/apache/lucene/search/join/TestJoinUtil.java
index 5591d5d..b29e9ff 100644
--- a/lucene/join/src/test/org/apache/lucene/search/join/TestJoinUtil.java
+++ b/lucene/join/src/test/org/apache/lucene/search/join/TestJoinUtil.java
@@ -464,8 +464,8 @@ public class TestJoinUtil extends LuceneTestCase {
       private final Query fieldQuery = new FieldValueQuery(priceField);
 
       @Override
-      public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-        Weight fieldWeight = fieldQuery.createWeight(searcher, false);
+      public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+        Weight fieldWeight = fieldQuery.createWeight(searcher, false, boost);
         return new Weight(this) {
 
           @Override
@@ -478,15 +478,6 @@ public class TestJoinUtil extends LuceneTestCase {
           }
 
           @Override
-          public float getValueForNormalization() throws IOException {
-            return 0;
-          }
-
-          @Override
-          public void normalize(float norm, float topLevelBoost) {
-          }
-
-          @Override
           public Scorer scorer(LeafReaderContext context) throws IOException {
             Scorer fieldScorer = fieldWeight.scorer(context);
             if (fieldScorer == null) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/misc/src/test/org/apache/lucene/search/TestDiversifiedTopDocsCollector.java
----------------------------------------------------------------------
diff --git a/lucene/misc/src/test/org/apache/lucene/search/TestDiversifiedTopDocsCollector.java b/lucene/misc/src/test/org/apache/lucene/search/TestDiversifiedTopDocsCollector.java
index 2f2d4f7..da9fdc5 100644
--- a/lucene/misc/src/test/org/apache/lucene/search/TestDiversifiedTopDocsCollector.java
+++ b/lucene/misc/src/test/org/apache/lucene/search/TestDiversifiedTopDocsCollector.java
@@ -419,9 +419,9 @@ public class TestDiversifiedTopDocsCollector extends LuceneTestCase {
     }
 
     @Override
-    public SimWeight computeWeight(
+    public SimWeight computeWeight(float boost,
         CollectionStatistics collectionStats, TermStatistics... termStats) {
-      return sim.computeWeight(collectionStats, termStats);
+      return sim.computeWeight(boost, collectionStats, termStats);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/queries/src/java/org/apache/lucene/queries/BoostingQuery.java
----------------------------------------------------------------------
diff --git a/lucene/queries/src/java/org/apache/lucene/queries/BoostingQuery.java b/lucene/queries/src/java/org/apache/lucene/queries/BoostingQuery.java
index 713014c..3bbbf1b 100644
--- a/lucene/queries/src/java/org/apache/lucene/queries/BoostingQuery.java
+++ b/lucene/queries/src/java/org/apache/lucene/queries/BoostingQuery.java
@@ -63,12 +63,12 @@ public class BoostingQuery extends Query {
     }
 
     @Override
-    public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+    public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
       if (needsScores == false) {
-        return match.createWeight(searcher, needsScores);
+        return match.createWeight(searcher, needsScores, boost);
       }
-      final Weight matchWeight = searcher.createWeight(match, needsScores);
-      final Weight contextWeight = searcher.createWeight(context, false);
+      final Weight matchWeight = searcher.createWeight(match, needsScores, boost);
+      final Weight contextWeight = searcher.createWeight(context, false, boost);
       return new Weight(this) {
 
         @Override
@@ -92,16 +92,6 @@ public class BoostingQuery extends Query {
         }
 
         @Override
-        public float getValueForNormalization() throws IOException {
-          return matchWeight.getValueForNormalization();
-        }
-
-        @Override
-        public void normalize(float norm, float boost) {
-          matchWeight.normalize(norm, boost);
-        }
-
-        @Override
         public Scorer scorer(LeafReaderContext context) throws IOException {
           final Scorer matchScorer = matchWeight.scorer(context);
           if (matchScorer == null) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java
----------------------------------------------------------------------
diff --git a/lucene/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java b/lucene/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java
index ab44fed..2ae6c01 100644
--- a/lucene/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java
+++ b/lucene/queries/src/java/org/apache/lucene/queries/CustomScoreQuery.java
@@ -26,7 +26,6 @@ import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.LeafReaderContext;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.queries.function.FunctionQuery;
-import org.apache.lucene.queries.function.ValueSource;
 import org.apache.lucene.search.Explanation;
 import org.apache.lucene.search.FilterScorer;
 import org.apache.lucene.search.IndexSearcher;
@@ -48,7 +47,6 @@ public class CustomScoreQuery extends Query implements Cloneable {
 
   private Query subQuery;
   private Query[] scoringQueries; // never null (empty array if there are no valSrcQueries).
-  private boolean strict = false; // if true, valueSource part of query does not take part in weights normalization.
 
   /**
    * Create a CustomScoreQuery over input subQuery.
@@ -131,7 +129,6 @@ public class CustomScoreQuery extends Query implements Cloneable {
       sb.append(", ").append(scoringQuery.toString(field));
     }
     sb.append(")");
-    sb.append(strict?" STRICT" : "");
     return sb.toString();
   }
 
@@ -144,7 +141,6 @@ public class CustomScoreQuery extends Query implements Cloneable {
 
   private boolean equalsTo(CustomScoreQuery other) {
     return subQuery.equals(other.subQuery) &&
-           strict == other.strict &&
            scoringQueries.length == other.scoringQueries.length &&
            Arrays.equals(scoringQueries, other.scoringQueries);
   }
@@ -155,7 +151,7 @@ public class CustomScoreQuery extends Query implements Cloneable {
     // Didn't change this hashcode, but it looks suspicious.
     return (classHash() + 
         subQuery.hashCode() + 
-        Arrays.hashCode(scoringQueries)) ^ (strict ? 1234 : 4321);
+        Arrays.hashCode(scoringQueries));
   }
   
   /**
@@ -171,19 +167,23 @@ public class CustomScoreQuery extends Query implements Cloneable {
   //=========================== W E I G H T ============================
   
   private class CustomWeight extends Weight {
-    Weight subQueryWeight;
-    Weight[] valSrcWeights;
-    boolean qStrict;
-    float queryWeight;
+    final Weight subQueryWeight;
+    final Weight[] valSrcWeights;
+    final float queryWeight;
 
-    public CustomWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+    public CustomWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
       super(CustomScoreQuery.this);
-      this.subQueryWeight = subQuery.createWeight(searcher, needsScores);
+      // note we DONT incorporate our boost, nor pass down any boost 
+      // (e.g. from outer BQ), as there is no guarantee that the CustomScoreProvider's 
+      // function obeys the distributive law... it might call sqrt() on the subQuery score
+      // or some other arbitrary function other than multiplication.
+      // so, instead boosts are applied directly in score()
+      this.subQueryWeight = subQuery.createWeight(searcher, needsScores, 1f);
       this.valSrcWeights = new Weight[scoringQueries.length];
       for(int i = 0; i < scoringQueries.length; i++) {
-        this.valSrcWeights[i] = scoringQueries[i].createWeight(searcher, needsScores);
+        this.valSrcWeights[i] = scoringQueries[i].createWeight(searcher, needsScores, 1f);
       }
-      this.qStrict = strict;
+      this.queryWeight = boost;
     }
 
     @Override
@@ -195,36 +195,6 @@ public class CustomScoreQuery extends Query implements Cloneable {
     }
 
     @Override
-    public float getValueForNormalization() throws IOException {
-      float sum = subQueryWeight.getValueForNormalization();
-      for (Weight valSrcWeight : valSrcWeights) {
-        if (qStrict == false) { // otherwise do not include ValueSource part in the query normalization
-          sum += valSrcWeight.getValueForNormalization();
-        }
-      }
-      return sum;
-    }
-
-    /*(non-Javadoc) @see org.apache.lucene.search.Weight#normalize(float) */
-    @Override
-    public void normalize(float norm, float boost) {
-      // note we DONT incorporate our boost, nor pass down any boost 
-      // (e.g. from outer BQ), as there is no guarantee that the CustomScoreProvider's 
-      // function obeys the distributive law... it might call sqrt() on the subQuery score
-      // or some other arbitrary function other than multiplication.
-      // so, instead boosts are applied directly in score()
-      subQueryWeight.normalize(norm, 1f);
-      for (Weight valSrcWeight : valSrcWeights) {
-        if (qStrict) {
-          valSrcWeight.normalize(1, 1); // do not normalize the ValueSource part
-        } else {
-          valSrcWeight.normalize(norm, 1f);
-        }
-      }
-      queryWeight = boost;
-    }
-
-    @Override
     public Scorer scorer(LeafReaderContext context) throws IOException {
       Scorer subQueryScorer = subQueryWeight.scorer(context);
       if (subQueryScorer == null) {
@@ -311,30 +281,8 @@ public class CustomScoreQuery extends Query implements Cloneable {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    return new CustomWeight(searcher, needsScores);
-  }
-
-  /**
-   * Checks if this is strict custom scoring.
-   * In strict custom scoring, the {@link ValueSource} part does not participate in weight normalization.
-   * This may be useful when one wants full control over how scores are modified, and does 
-   * not care about normalizing by the {@link ValueSource} part.
-   * One particular case where this is useful if for testing this query.   
-   * <P>
-   * Note: only has effect when the {@link ValueSource} part is not null.
-   */
-  public boolean isStrict() {
-    return strict;
-  }
-
-  /**
-   * Set the strict mode of this query. 
-   * @param strict The strict mode to set.
-   * @see #isStrict()
-   */
-  public void setStrict(boolean strict) {
-    this.strict = strict;
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    return new CustomWeight(searcher, needsScores, boost);
   }
 
   /** The sub-query that CustomScoreQuery wraps, affecting both the score and which documents match. */

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/queries/src/java/org/apache/lucene/queries/TermsQuery.java
----------------------------------------------------------------------
diff --git a/lucene/queries/src/java/org/apache/lucene/queries/TermsQuery.java b/lucene/queries/src/java/org/apache/lucene/queries/TermsQuery.java
index 5c03b2d..7b7f094 100644
--- a/lucene/queries/src/java/org/apache/lucene/queries/TermsQuery.java
+++ b/lucene/queries/src/java/org/apache/lucene/queries/TermsQuery.java
@@ -254,8 +254,8 @@ public class TermsQuery extends Query implements Accountable {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    return new ConstantScoreWeight(this) {
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    return new ConstantScoreWeight(this, boost) {
 
       @Override
       public void extractTerms(Set<Term> terms) {
@@ -334,8 +334,7 @@ public class TermsQuery extends Query implements Accountable {
             bq.add(new TermQuery(new Term(t.field, t.term), termContext), Occur.SHOULD);
           }
           Query q = new ConstantScoreQuery(bq.build());
-          final Weight weight = searcher.rewrite(q).createWeight(searcher, needsScores);
-          weight.normalize(1f, score());
+          final Weight weight = searcher.rewrite(q).createWeight(searcher, needsScores, score());
           return new WeightOrDocIdSet(weight);
         } else {
           assert builder != null;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/queries/src/java/org/apache/lucene/queries/function/BoostedQuery.java
----------------------------------------------------------------------
diff --git a/lucene/queries/src/java/org/apache/lucene/queries/function/BoostedQuery.java b/lucene/queries/src/java/org/apache/lucene/queries/function/BoostedQuery.java
index 3d82723..c8b9423 100644
--- a/lucene/queries/src/java/org/apache/lucene/queries/function/BoostedQuery.java
+++ b/lucene/queries/src/java/org/apache/lucene/queries/function/BoostedQuery.java
@@ -59,17 +59,17 @@ public final class BoostedQuery extends Query {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    return new BoostedQuery.BoostedWeight(searcher, needsScores);
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    return new BoostedQuery.BoostedWeight(searcher, needsScores, boost);
   }
 
   private class BoostedWeight extends Weight {
     Weight qWeight;
     Map fcontext;
 
-    public BoostedWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+    public BoostedWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
       super(BoostedQuery.this);
-      this.qWeight = searcher.createWeight(q, needsScores);
+      this.qWeight = searcher.createWeight(q, needsScores, boost);
       this.fcontext = ValueSource.newContext(searcher);
       boostVal.createWeight(fcontext,searcher);
     }
@@ -80,16 +80,6 @@ public final class BoostedQuery extends Query {
     }
 
     @Override
-    public float getValueForNormalization() throws IOException {
-      return qWeight.getValueForNormalization();
-    }
-
-    @Override
-    public void normalize(float norm, float boost) {
-      qWeight.normalize(norm, boost);
-    }
-
-    @Override
     public Scorer scorer(LeafReaderContext context) throws IOException {
       Scorer subQueryScorer = qWeight.scorer(context);
       if (subQueryScorer == null) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/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 e6152e8..4acb563 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
@@ -55,35 +55,23 @@ public class FunctionQuery extends Query {
 
   protected class FunctionWeight extends Weight {
     protected final IndexSearcher searcher;
-    protected float queryNorm, boost, queryWeight;
+    protected final float boost;
     protected final Map context;
 
-    public FunctionWeight(IndexSearcher searcher) throws IOException {
+    public FunctionWeight(IndexSearcher searcher, float boost) throws IOException {
       super(FunctionQuery.this);
       this.searcher = searcher;
       this.context = ValueSource.newContext(searcher);
       func.createWeight(context, searcher);
-      normalize(1f, 1f);;
+      this.boost = boost;
     }
 
     @Override
     public void extractTerms(Set<Term> terms) {}
 
     @Override
-    public float getValueForNormalization() throws IOException {
-      return queryWeight * queryWeight;
-    }
-
-    @Override
-    public void normalize(float norm, float boost) {
-      this.queryNorm = norm;
-      this.boost = boost;
-      this.queryWeight = norm * boost;
-    }
-
-    @Override
     public Scorer scorer(LeafReaderContext context) throws IOException {
-      return new AllScorer(context, this, queryWeight);
+      return new AllScorer(context, this, boost);
     }
 
     @Override
@@ -96,14 +84,14 @@ public class FunctionQuery extends Query {
     final IndexReader reader;
     final FunctionWeight weight;
     final int maxDoc;
-    final float qWeight;
+    final float boost;
     final DocIdSetIterator iterator;
     final FunctionValues vals;
 
-    public AllScorer(LeafReaderContext context, FunctionWeight w, float qWeight) throws IOException {
+    public AllScorer(LeafReaderContext context, FunctionWeight w, float boost) throws IOException {
       super(w);
       this.weight = w;
-      this.qWeight = qWeight;
+      this.boost = boost;
       this.reader = context.reader();
       this.maxDoc = reader.maxDoc();
       iterator = DocIdSetIterator.all(context.reader().maxDoc());
@@ -122,7 +110,7 @@ public class FunctionQuery extends Query {
 
     @Override
     public float score() throws IOException {
-      float score = qWeight * vals.floatVal(docID());
+      float score = boost * vals.floatVal(docID());
 
       // Current Lucene priority queues can't handle NaN and -Infinity, so
       // map to -Float.MAX_VALUE. This conditional handles both -infinity
@@ -136,20 +124,19 @@ public class FunctionQuery extends Query {
     }
 
     public Explanation explain(int doc) throws IOException {
-      float sc = qWeight * vals.floatVal(doc);
+      float sc = boost * vals.floatVal(doc);
 
       return Explanation.match(sc, "FunctionQuery(" + func + "), product of:",
           vals.explain(doc),
-          Explanation.match(weight.boost, "boost"),
-          Explanation.match(weight.queryNorm, "queryNorm"));
+          Explanation.match(weight.boost, "boost"));
     }
 
   }
 
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    return new FunctionQuery.FunctionWeight(searcher);
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    return new FunctionQuery.FunctionWeight(searcher, boost);
   }
 
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/queries/src/java/org/apache/lucene/queries/function/FunctionRangeQuery.java
----------------------------------------------------------------------
diff --git a/lucene/queries/src/java/org/apache/lucene/queries/function/FunctionRangeQuery.java b/lucene/queries/src/java/org/apache/lucene/queries/function/FunctionRangeQuery.java
index 60cfca3..41572a5 100644
--- a/lucene/queries/src/java/org/apache/lucene/queries/function/FunctionRangeQuery.java
+++ b/lucene/queries/src/java/org/apache/lucene/queries/function/FunctionRangeQuery.java
@@ -114,7 +114,7 @@ public class FunctionRangeQuery extends Query {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
     return new FunctionRangeWeight(searcher);
   }
 
@@ -133,17 +133,6 @@ public class FunctionRangeQuery extends Query {
       //none
     }
 
-    //Note: this uses the functionValue's floatVal() as the score; queryNorm/boost is ignored.
-    @Override
-    public float getValueForNormalization() throws IOException {
-      return 1f;
-    }
-
-    @Override
-    public void normalize(float norm, float topLevelBoost) {
-      //no-op
-    }
-
     @Override
     public Explanation explain(LeafReaderContext context, int doc) throws IOException {
       FunctionValues functionValues = valueSource.getValues(vsContext, context);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/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 2d483ba..5669406 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
@@ -86,11 +86,11 @@ public class PayloadScoreQuery extends SpanQuery {
   }
 
   @Override
-  public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    SpanWeight innerWeight = wrappedQuery.createWeight(searcher, needsScores);
+  public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    SpanWeight innerWeight = wrappedQuery.createWeight(searcher, needsScores, boost);
     if (!needsScores)
       return innerWeight;
-    return new PayloadSpanWeight(searcher, innerWeight);
+    return new PayloadSpanWeight(searcher, innerWeight, boost);
   }
 
   @Override
@@ -116,8 +116,8 @@ public class PayloadScoreQuery extends SpanQuery {
 
     private final SpanWeight innerWeight;
 
-    public PayloadSpanWeight(IndexSearcher searcher, SpanWeight innerWeight) throws IOException {
-      super(PayloadScoreQuery.this, searcher, null);
+    public PayloadSpanWeight(IndexSearcher searcher, SpanWeight innerWeight, float boost) throws IOException {
+      super(PayloadScoreQuery.this, searcher, null, boost);
       this.innerWeight = innerWeight;
     }
 
@@ -147,16 +147,6 @@ public class PayloadScoreQuery extends SpanQuery {
     }
 
     @Override
-    public float getValueForNormalization() throws IOException {
-      return innerWeight.getValueForNormalization();
-    }
-
-    @Override
-    public void normalize(float queryNorm, float topLevelBoost) {
-      innerWeight.normalize(queryNorm, topLevelBoost);
-    }
-
-    @Override
     public Explanation explain(LeafReaderContext context, int doc) throws IOException {
       PayloadSpanScorer scorer = scorer(context);
       if (scorer == null || scorer.iterator().advance(doc) != doc)

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/queries/src/java/org/apache/lucene/queries/payloads/SpanPayloadCheckQuery.java
----------------------------------------------------------------------
diff --git a/lucene/queries/src/java/org/apache/lucene/queries/payloads/SpanPayloadCheckQuery.java b/lucene/queries/src/java/org/apache/lucene/queries/payloads/SpanPayloadCheckQuery.java
index 419a82a..57ba678 100644
--- a/lucene/queries/src/java/org/apache/lucene/queries/payloads/SpanPayloadCheckQuery.java
+++ b/lucene/queries/src/java/org/apache/lucene/queries/payloads/SpanPayloadCheckQuery.java
@@ -59,9 +59,9 @@ public class SpanPayloadCheckQuery extends SpanQuery {
   }
 
   @Override
-  public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    SpanWeight matchWeight = match.createWeight(searcher, false);
-    return new SpanPayloadCheckWeight(searcher, needsScores ? getTermContexts(matchWeight) : null, matchWeight);
+  public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    SpanWeight matchWeight = match.createWeight(searcher, false, boost);
+    return new SpanPayloadCheckWeight(searcher, needsScores ? getTermContexts(matchWeight) : null, matchWeight, boost);
   }
 
   /**
@@ -71,8 +71,8 @@ public class SpanPayloadCheckQuery extends SpanQuery {
 
     final SpanWeight matchWeight;
 
-    public SpanPayloadCheckWeight(IndexSearcher searcher, Map<Term, TermContext> termContexts, SpanWeight matchWeight) throws IOException {
-      super(SpanPayloadCheckQuery.this, searcher, termContexts);
+    public SpanPayloadCheckWeight(IndexSearcher searcher, Map<Term, TermContext> termContexts, SpanWeight matchWeight, float boost) throws IOException {
+      super(SpanPayloadCheckQuery.this, searcher, termContexts, boost);
       this.matchWeight = matchWeight;
     }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/queries/src/test/org/apache/lucene/queries/TestCustomScoreExplanations.java
----------------------------------------------------------------------
diff --git a/lucene/queries/src/test/org/apache/lucene/queries/TestCustomScoreExplanations.java b/lucene/queries/src/test/org/apache/lucene/queries/TestCustomScoreExplanations.java
index c87a004..ab3cced 100644
--- a/lucene/queries/src/test/org/apache/lucene/queries/TestCustomScoreExplanations.java
+++ b/lucene/queries/src/test/org/apache/lucene/queries/TestCustomScoreExplanations.java
@@ -62,36 +62,30 @@ public class TestCustomScoreExplanations extends BaseExplanationTestCase {
     searcher.setSimilarity(new BM25Similarity());
 
     Explanation expl = searcher.explain(query, 0);
+    assertEquals(2, expl.getDetails().length);
     // function
     assertEquals(5f, expl.getDetails()[0].getValue(), 0f);
     // boost
     assertEquals("boost", expl.getDetails()[1].getDescription());
     assertEquals(1f, expl.getDetails()[1].getValue(), 0f);
-    // norm
-    assertEquals("queryNorm", expl.getDetails()[2].getDescription());
-    assertEquals(1f, expl.getDetails()[2].getValue(), 0f);
 
     query = new BoostQuery(query, 2);
     expl = searcher.explain(query, 0);
+    assertEquals(2, expl.getDetails().length);
     // function
     assertEquals(5f, expl.getDetails()[0].getValue(), 0f);
     // boost
     assertEquals("boost", expl.getDetails()[1].getDescription());
     assertEquals(2f, expl.getDetails()[1].getValue(), 0f);
-    // norm
-    assertEquals("queryNorm", expl.getDetails()[2].getDescription());
-    assertEquals(1f, expl.getDetails()[2].getValue(), 0f);
 
     searcher.setSimilarity(new ClassicSimilarity()); // in order to have a queryNorm != 1
     expl = searcher.explain(query, 0);
+    assertEquals(2, expl.getDetails().length);
     // function
     assertEquals(5f, expl.getDetails()[0].getValue(), 0f);
     // boost
     assertEquals("boost", expl.getDetails()[1].getDescription());
     assertEquals(2f, expl.getDetails()[1].getValue(), 0f);
-    // norm
-    assertEquals("queryNorm", expl.getDetails()[2].getDescription());
-    assertEquals(0.5f, expl.getDetails()[2].getValue(), 0f);
   }
 }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/queries/src/test/org/apache/lucene/queries/TestCustomScoreQuery.java
----------------------------------------------------------------------
diff --git a/lucene/queries/src/test/org/apache/lucene/queries/TestCustomScoreQuery.java b/lucene/queries/src/test/org/apache/lucene/queries/TestCustomScoreQuery.java
index c3ee47d..0caa4ce 100644
--- a/lucene/queries/src/test/org/apache/lucene/queries/TestCustomScoreQuery.java
+++ b/lucene/queries/src/test/org/apache/lucene/queries/TestCustomScoreQuery.java
@@ -246,7 +246,6 @@ public class TestCustomScoreQuery extends FunctionTestSetup {
     Query q3CustomMul;
     {
       CustomScoreQuery csq = new CustomScoreQuery(q1, functionQuery);
-      csq.setStrict(true);
       q3CustomMul = csq;
     }
     q3CustomMul = new BoostQuery(q3CustomMul, boost);
@@ -256,7 +255,6 @@ public class TestCustomScoreQuery extends FunctionTestSetup {
     Query q4CustomAdd;
     {
       CustomScoreQuery csq = new CustomAddQuery(q1, functionQuery);
-      csq.setStrict(true);
       q4CustomAdd = csq;
     }
     q4CustomAdd = new BoostQuery(q4CustomAdd, boost);
@@ -266,7 +264,6 @@ public class TestCustomScoreQuery extends FunctionTestSetup {
     Query q5CustomMulAdd;
     {
       CustomScoreQuery csq = new CustomMulAddQuery(q1, functionQuery, functionQuery);
-      csq.setStrict(true);
       q5CustomMulAdd = csq;
     }
     q5CustomMulAdd = new BoostQuery(q5CustomMulAdd, boost);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/queries/src/test/org/apache/lucene/queries/function/TestLongNormValueSource.java
----------------------------------------------------------------------
diff --git a/lucene/queries/src/test/org/apache/lucene/queries/function/TestLongNormValueSource.java b/lucene/queries/src/test/org/apache/lucene/queries/function/TestLongNormValueSource.java
index 4518699..cfebc47 100644
--- a/lucene/queries/src/test/org/apache/lucene/queries/function/TestLongNormValueSource.java
+++ b/lucene/queries/src/test/org/apache/lucene/queries/function/TestLongNormValueSource.java
@@ -124,12 +124,6 @@ class PreciseClassicSimilarity extends TFIDFSimilarity {
   /** Sole constructor: parameter-free */
   public PreciseClassicSimilarity() {}
 
-  /** Implemented as <code>1/sqrt(sumOfSquaredWeights)</code>. */
-  @Override
-  public float queryNorm(float sumOfSquaredWeights) {
-    return (float)(1.0 / Math.sqrt(sumOfSquaredWeights));
-  }
-
   /**
    * Encodes a normalization factor for storage in an index.
    * <p>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/queries/src/test/org/apache/lucene/queries/payloads/TestPayloadScoreQuery.java
----------------------------------------------------------------------
diff --git a/lucene/queries/src/test/org/apache/lucene/queries/payloads/TestPayloadScoreQuery.java b/lucene/queries/src/test/org/apache/lucene/queries/payloads/TestPayloadScoreQuery.java
index 7429797..188ef61 100644
--- a/lucene/queries/src/test/org/apache/lucene/queries/payloads/TestPayloadScoreQuery.java
+++ b/lucene/queries/src/test/org/apache/lucene/queries/payloads/TestPayloadScoreQuery.java
@@ -262,11 +262,6 @@ public class TestPayloadScoreQuery extends LuceneTestCase {
 
   static class BoostingSimilarity extends MultiplyingSimilarity {
 
-    @Override
-    public float queryNorm(float sumOfSquaredWeights) {
-      return 1.0f;
-    }
-
     //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     //Make everything else 1 so we see the effect of the payload
     //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/queries/src/test/org/apache/lucene/queries/payloads/TestPayloadSpans.java
----------------------------------------------------------------------
diff --git a/lucene/queries/src/test/org/apache/lucene/queries/payloads/TestPayloadSpans.java b/lucene/queries/src/test/org/apache/lucene/queries/payloads/TestPayloadSpans.java
index 2c0204d..3c5b80f 100644
--- a/lucene/queries/src/test/org/apache/lucene/queries/payloads/TestPayloadSpans.java
+++ b/lucene/queries/src/test/org/apache/lucene/queries/payloads/TestPayloadSpans.java
@@ -74,12 +74,12 @@ public class TestPayloadSpans extends LuceneTestCase {
     Spans spans;
     stq = new SpanTermQuery(new Term(PayloadHelper.FIELD, "seventy"));
 
-    spans = stq.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS);
+    spans = stq.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS);
     assertTrue("spans is null and it shouldn't be", spans != null);
     checkSpans(spans, 100, 1, 1, 1);
 
     stq = new SpanTermQuery(new Term(PayloadHelper.NO_PAYLOAD_FIELD, "seventy"));  
-    spans = stq.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS);
+    spans = stq.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS);
     assertTrue("spans is null and it shouldn't be", spans != null);
     checkSpans(spans, 100, 0, 0, 0);
   }
@@ -90,7 +90,7 @@ public class TestPayloadSpans extends LuceneTestCase {
     SpanFirstQuery sfq;
     match = new SpanTermQuery(new Term(PayloadHelper.FIELD, "one"));
     sfq = new SpanFirstQuery(match, 2);
-    Spans spans = sfq.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS);
+    Spans spans = sfq.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS);
     checkSpans(spans, 109, 1, 1, 1);
     //Test more complicated subclause
     SpanQuery[] clauses = new SpanQuery[2];
@@ -98,11 +98,11 @@ public class TestPayloadSpans extends LuceneTestCase {
     clauses[1] = new SpanTermQuery(new Term(PayloadHelper.FIELD, "hundred"));
     match = new SpanNearQuery(clauses, 0, true);
     sfq = new SpanFirstQuery(match, 2);
-    checkSpans(sfq.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS), 100, 2, 1, 1);
+    checkSpans(sfq.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS), 100, 2, 1, 1);
 
     match = new SpanNearQuery(clauses, 0, false);
     sfq = new SpanFirstQuery(match, 2);
-    checkSpans(sfq.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS), 100, 2, 1, 1);
+    checkSpans(sfq.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS), 100, 2, 1, 1);
     
   }
   
@@ -125,7 +125,7 @@ public class TestPayloadSpans extends LuceneTestCase {
     IndexReader reader = getOnlyLeafReader(writer.getReader());
     writer.close();
 
-    checkSpans(snq.createWeight(newSearcher(reader, false), false).getSpans(reader.leaves().get(0), SpanWeight.Postings.PAYLOADS), 1, new int[]{2});
+    checkSpans(snq.createWeight(newSearcher(reader, false), false, 1f).getSpans(reader.leaves().get(0), SpanWeight.Postings.PAYLOADS), 1, new int[]{2});
     reader.close();
     directory.close();
   }
@@ -136,7 +136,7 @@ public class TestPayloadSpans extends LuceneTestCase {
     IndexSearcher searcher = getSearcher();
 
     stq = new SpanTermQuery(new Term(PayloadHelper.FIELD, "mark"));
-    spans = stq.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS);
+    spans = stq.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS);
     assertNull(spans);
 
     SpanQuery[] clauses = new SpanQuery[3];
@@ -145,7 +145,7 @@ public class TestPayloadSpans extends LuceneTestCase {
     clauses[2] = new SpanTermQuery(new Term(PayloadHelper.FIELD, "xx"));
     SpanNearQuery spanNearQuery = new SpanNearQuery(clauses, 12, false);
 
-    spans = spanNearQuery.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS);
+    spans = spanNearQuery.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS);
     assertTrue("spans is null and it shouldn't be", spans != null);
     checkSpans(spans, 2, new int[]{3,3});
 
@@ -156,7 +156,7 @@ public class TestPayloadSpans extends LuceneTestCase {
 
     spanNearQuery = new SpanNearQuery(clauses, 6, true);
    
-    spans = spanNearQuery.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS);
+    spans = spanNearQuery.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS);
 
     assertTrue("spans is null and it shouldn't be", spans != null);
     checkSpans(spans, 1, new int[]{3});
@@ -178,7 +178,7 @@ public class TestPayloadSpans extends LuceneTestCase {
     SpanNearQuery nestedSpanNearQuery = new SpanNearQuery(clauses2, 6, false);
     
     // yy within 6 of xx within 6 of rr
-    spans = nestedSpanNearQuery.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS);
+    spans = nestedSpanNearQuery.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS);
     assertTrue("spans is null and it shouldn't be", spans != null);
     checkSpans(spans, 2, new int[]{3,3});
     closeIndexReader.close();
@@ -209,7 +209,7 @@ public class TestPayloadSpans extends LuceneTestCase {
     clauses3[1] = snq;
 
     SpanNearQuery nestedSpanNearQuery = new SpanNearQuery(clauses3, 6, false);
-    spans = nestedSpanNearQuery.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS);
+    spans = nestedSpanNearQuery.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS);
 
     assertTrue("spans is null and it shouldn't be", spans != null);
     checkSpans(spans, 1, new int[]{3});
@@ -247,7 +247,7 @@ public class TestPayloadSpans extends LuceneTestCase {
      
     SpanNearQuery nestedSpanNearQuery = new SpanNearQuery(clauses3, 6, false);
 
-    spans = nestedSpanNearQuery.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS);
+    spans = nestedSpanNearQuery.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS);
     assertTrue("spans is null and it shouldn't be", spans != null);
     checkSpans(spans, 2, new int[]{8, 8});
     closeIndexReader.close();
@@ -272,7 +272,7 @@ public class TestPayloadSpans extends LuceneTestCase {
     SpanQuery[] sqs = { stq1, stq2 };
     SpanNearQuery snq = new SpanNearQuery(sqs, 1, true);
     VerifyingCollector collector = new VerifyingCollector();
-    Spans spans = snq.createWeight(is, false).getSpans(is.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS);
+    Spans spans = snq.createWeight(is, false, 1f).getSpans(is.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS);
 
     TopDocs topDocs = is.search(snq, 1);
     Set<String> payloadSet = new HashSet<>();
@@ -311,7 +311,7 @@ public class TestPayloadSpans extends LuceneTestCase {
     SpanQuery[] sqs = { stq1, stq2 };
     SpanNearQuery snq = new SpanNearQuery(sqs, 0, true);
     VerifyingCollector collector = new VerifyingCollector();
-    Spans spans = snq.createWeight(is, false).getSpans(is.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS);
+    Spans spans = snq.createWeight(is, false, 1f).getSpans(is.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS);
 
     TopDocs topDocs = is.search(snq, 1);
     Set<String> payloadSet = new HashSet<>();
@@ -349,7 +349,7 @@ public class TestPayloadSpans extends LuceneTestCase {
     SpanTermQuery stq2 = new SpanTermQuery(new Term("content", "k"));
     SpanQuery[] sqs = { stq1, stq2 };
     SpanNearQuery snq = new SpanNearQuery(sqs, 0, true);
-    Spans spans = snq.createWeight(is, false).getSpans(is.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS);
+    Spans spans = snq.createWeight(is, false, 1f).getSpans(is.getIndexReader().leaves().get(0), SpanWeight.Postings.PAYLOADS);
 
     TopDocs topDocs = is.search(snq, 1);
     Set<String> payloadSet = new HashSet<>();

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/queries/src/test/org/apache/lucene/queries/payloads/TestPayloadTermQuery.java
----------------------------------------------------------------------
diff --git a/lucene/queries/src/test/org/apache/lucene/queries/payloads/TestPayloadTermQuery.java b/lucene/queries/src/test/org/apache/lucene/queries/payloads/TestPayloadTermQuery.java
index 8f65c1a..9cc7067 100644
--- a/lucene/queries/src/test/org/apache/lucene/queries/payloads/TestPayloadTermQuery.java
+++ b/lucene/queries/src/test/org/apache/lucene/queries/payloads/TestPayloadTermQuery.java
@@ -164,7 +164,7 @@ public class TestPayloadTermQuery extends LuceneTestCase {
       assertTrue(doc.score + " does not equal: " + 1, doc.score == 1);
     }
     CheckHits.checkExplanations(query, PayloadHelper.FIELD, searcher, true);
-    Spans spans = query.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
+    Spans spans = query.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
     assertTrue("spans is null and it shouldn't be", spans != null);
     /*float score = hits.score(0);
     for (int i =1; i < hits.length(); i++)
@@ -215,7 +215,7 @@ public class TestPayloadTermQuery extends LuceneTestCase {
     }
     assertTrue(numTens + " does not equal: " + 10, numTens == 10);
     CheckHits.checkExplanations(query, "field", searcher, true);
-    Spans spans = query.createWeight(searcher, false).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
+    Spans spans = query.createWeight(searcher, false, 1f).getSpans(searcher.getIndexReader().leaves().get(0), SpanWeight.Postings.POSITIONS);
     assertTrue("spans is null and it shouldn't be", spans != null);
     //should be two matches per document
     int count = 0;
@@ -257,11 +257,6 @@ public class TestPayloadTermQuery extends LuceneTestCase {
 
   static class BoostingSimilarity extends ClassicSimilarity {
 
-    @Override
-    public float queryNorm(float sumOfSquaredWeights) {
-      return 1;
-    }
-
     // TODO: Remove warning after API has been finalized
     @Override
     public float scorePayload(int docId, int start, int end, BytesRef payload) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/sandbox/src/java/org/apache/lucene/document/LatLonPointDistanceQuery.java
----------------------------------------------------------------------
diff --git a/lucene/sandbox/src/java/org/apache/lucene/document/LatLonPointDistanceQuery.java b/lucene/sandbox/src/java/org/apache/lucene/document/LatLonPointDistanceQuery.java
index d479713..1b20d95 100644
--- a/lucene/sandbox/src/java/org/apache/lucene/document/LatLonPointDistanceQuery.java
+++ b/lucene/sandbox/src/java/org/apache/lucene/document/LatLonPointDistanceQuery.java
@@ -67,7 +67,7 @@ final class LatLonPointDistanceQuery extends Query {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
     Rectangle box = Rectangle.fromPointDistance(latitude, longitude, radiusMeters);
     // create bounding box(es) for the distance range
     // these are pre-encoded with LatLonPoint's encoding
@@ -100,7 +100,7 @@ final class LatLonPointDistanceQuery extends Query {
 
     final double axisLat = Rectangle.axisLat(latitude, radiusMeters);
 
-    return new ConstantScoreWeight(this) {
+    return new ConstantScoreWeight(this, boost) {
 
       @Override
       public Scorer scorer(LeafReaderContext context) throws IOException {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/sandbox/src/java/org/apache/lucene/document/LatLonPointInPolygonQuery.java
----------------------------------------------------------------------
diff --git a/lucene/sandbox/src/java/org/apache/lucene/document/LatLonPointInPolygonQuery.java b/lucene/sandbox/src/java/org/apache/lucene/document/LatLonPointInPolygonQuery.java
index 8db8296..036fe2c 100644
--- a/lucene/sandbox/src/java/org/apache/lucene/document/LatLonPointInPolygonQuery.java
+++ b/lucene/sandbox/src/java/org/apache/lucene/document/LatLonPointInPolygonQuery.java
@@ -74,7 +74,7 @@ final class LatLonPointInPolygonQuery extends Query {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
 
     // I don't use RandomAccessWeight here: it's no good to approximate with "match all docs"; this is an inverted structure and should be
     // used in the first pass:
@@ -93,7 +93,7 @@ final class LatLonPointInPolygonQuery extends Query {
 
     final Polygon2D tree = Polygon2D.create(polygons);
 
-    return new ConstantScoreWeight(this) {
+    return new ConstantScoreWeight(this, boost) {
 
       @Override
       public Scorer scorer(LeafReaderContext context) throws IOException {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/sandbox/src/java/org/apache/lucene/search/DocValuesNumbersQuery.java
----------------------------------------------------------------------
diff --git a/lucene/sandbox/src/java/org/apache/lucene/search/DocValuesNumbersQuery.java b/lucene/sandbox/src/java/org/apache/lucene/search/DocValuesNumbersQuery.java
index a588e88..655e9f3 100644
--- a/lucene/sandbox/src/java/org/apache/lucene/search/DocValuesNumbersQuery.java
+++ b/lucene/sandbox/src/java/org/apache/lucene/search/DocValuesNumbersQuery.java
@@ -95,8 +95,8 @@ public class DocValuesNumbersQuery extends Query {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    return new RandomAccessWeight(this) {
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    return new RandomAccessWeight(this, boost) {
 
       @Override
       protected Bits getMatchingDocs(LeafReaderContext context) throws IOException {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/sandbox/src/java/org/apache/lucene/search/DocValuesRangeQuery.java
----------------------------------------------------------------------
diff --git a/lucene/sandbox/src/java/org/apache/lucene/search/DocValuesRangeQuery.java b/lucene/sandbox/src/java/org/apache/lucene/search/DocValuesRangeQuery.java
index d603040..44f3f8c 100644
--- a/lucene/sandbox/src/java/org/apache/lucene/search/DocValuesRangeQuery.java
+++ b/lucene/sandbox/src/java/org/apache/lucene/search/DocValuesRangeQuery.java
@@ -139,11 +139,11 @@ public final class DocValuesRangeQuery extends Query {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
     if (lowerVal == null && upperVal == null) {
       throw new IllegalStateException("Both min and max values must not be null, call rewrite first");
     }
-    return new RandomAccessWeight(DocValuesRangeQuery.this) {
+    return new RandomAccessWeight(DocValuesRangeQuery.this, boost) {
       
       @Override
       protected Bits getMatchingDocs(LeafReaderContext context) throws IOException {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/sandbox/src/java/org/apache/lucene/search/DocValuesTermsQuery.java
----------------------------------------------------------------------
diff --git a/lucene/sandbox/src/java/org/apache/lucene/search/DocValuesTermsQuery.java b/lucene/sandbox/src/java/org/apache/lucene/search/DocValuesTermsQuery.java
index 7cb2ce1..4be4b18 100644
--- a/lucene/sandbox/src/java/org/apache/lucene/search/DocValuesTermsQuery.java
+++ b/lucene/sandbox/src/java/org/apache/lucene/search/DocValuesTermsQuery.java
@@ -148,8 +148,8 @@ public class DocValuesTermsQuery extends Query {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    return new RandomAccessWeight(this) {
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    return new RandomAccessWeight(this, boost) {
 
       @Override
       protected Bits getMatchingDocs(LeafReaderContext context) throws IOException {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/sandbox/src/java/org/apache/lucene/search/TermAutomatonQuery.java
----------------------------------------------------------------------
diff --git a/lucene/sandbox/src/java/org/apache/lucene/search/TermAutomatonQuery.java b/lucene/sandbox/src/java/org/apache/lucene/search/TermAutomatonQuery.java
index b3a7ba2..530a9b6 100644
--- a/lucene/sandbox/src/java/org/apache/lucene/search/TermAutomatonQuery.java
+++ b/lucene/sandbox/src/java/org/apache/lucene/search/TermAutomatonQuery.java
@@ -186,7 +186,7 @@ public class TermAutomatonQuery extends Query {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
     IndexReaderContext context = searcher.getTopReaderContext();
     Map<Integer,TermContext> termStates = new HashMap<>();
 
@@ -196,7 +196,7 @@ public class TermAutomatonQuery extends Query {
       }
     }
 
-    return new TermAutomatonWeight(det, searcher, termStates);
+    return new TermAutomatonWeight(det, searcher, termStates, boost);
   }
 
   @Override
@@ -332,7 +332,7 @@ public class TermAutomatonQuery extends Query {
     private final Similarity.SimWeight stats;
     private final Similarity similarity;
 
-    public TermAutomatonWeight(Automaton automaton, IndexSearcher searcher, Map<Integer,TermContext> termStates) throws IOException {
+    public TermAutomatonWeight(Automaton automaton, IndexSearcher searcher, Map<Integer,TermContext> termStates, float boost) throws IOException {
       super(TermAutomatonQuery.this);
       this.automaton = automaton;
       this.termStates = termStates;
@@ -345,7 +345,7 @@ public class TermAutomatonQuery extends Query {
         }
       }
 
-      stats = similarity.computeWeight(searcher.collectionStatistics(field),
+      stats = similarity.computeWeight(boost, searcher.collectionStatistics(field),
                                        allTermStats.toArray(new TermStatistics[allTermStats.size()]));
     }
 
@@ -364,16 +364,6 @@ public class TermAutomatonQuery extends Query {
     }
 
     @Override
-    public float getValueForNormalization() {
-      return stats.getValueForNormalization();
-    }
-
-    @Override
-    public void normalize(float queryNorm, float boost) {
-      stats.normalize(queryNorm, boost);
-    }
-
-    @Override
     public Scorer scorer(LeafReaderContext context) throws IOException {
 
       // Initialize the enums; null for a given slot means that term didn't appear in this reader

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/sandbox/src/test/org/apache/lucene/sandbox/queries/FuzzyLikeThisQueryTest.java
----------------------------------------------------------------------
diff --git a/lucene/sandbox/src/test/org/apache/lucene/sandbox/queries/FuzzyLikeThisQueryTest.java b/lucene/sandbox/src/test/org/apache/lucene/sandbox/queries/FuzzyLikeThisQueryTest.java
index b321494..a8c8b51 100644
--- a/lucene/sandbox/src/test/org/apache/lucene/sandbox/queries/FuzzyLikeThisQueryTest.java
+++ b/lucene/sandbox/src/test/org/apache/lucene/sandbox/queries/FuzzyLikeThisQueryTest.java
@@ -80,7 +80,7 @@ public class FuzzyLikeThisQueryTest extends LuceneTestCase {
     flt.addTerms("smith", "name", 0.3f, 1);
     Query q = flt.rewrite(searcher.getIndexReader());
     HashSet<Term> queryTerms = new HashSet<>();
-    searcher.createWeight(q, true).extractTerms(queryTerms);
+    searcher.createWeight(q, true, 1f).extractTerms(queryTerms);
     assertTrue("Should have variant smythe", queryTerms.contains(new Term("name", "smythe")));
     assertTrue("Should have variant smith", queryTerms.contains(new Term("name", "smith")));
     assertTrue("Should have variant smyth", queryTerms.contains(new Term("name", "smyth")));
@@ -97,7 +97,7 @@ public class FuzzyLikeThisQueryTest extends LuceneTestCase {
     flt.addTerms("jonathin smoth", "name", 0.3f, 1);
     Query q = flt.rewrite(searcher.getIndexReader());
     HashSet<Term> queryTerms = new HashSet<>();
-    searcher.createWeight(q, true).extractTerms(queryTerms);
+    searcher.createWeight(q, true, 1f).extractTerms(queryTerms);
     assertTrue("Should have variant jonathan", queryTerms.contains(new Term("name", "jonathan")));
     assertTrue("Should have variant smith", queryTerms.contains(new Term("name", "smith")));
     TopDocs topDocs = searcher.search(flt, 1);
@@ -115,7 +115,7 @@ public class FuzzyLikeThisQueryTest extends LuceneTestCase {
     // don't fail here just because the field doesn't exits
     Query q = flt.rewrite(searcher.getIndexReader());
     HashSet<Term> queryTerms = new HashSet<>();
-    searcher.createWeight(q, true).extractTerms(queryTerms);
+    searcher.createWeight(q, true, 1f).extractTerms(queryTerms);
     assertTrue("Should have variant jonathan", queryTerms.contains(new Term("name", "jonathan")));
     assertTrue("Should have variant smith", queryTerms.contains(new Term("name", "smith")));
     TopDocs topDocs = searcher.search(flt, 1);
@@ -132,7 +132,7 @@ public class FuzzyLikeThisQueryTest extends LuceneTestCase {
     flt.addTerms("fernando smith", "name", 0.3f, 1);
     Query q = flt.rewrite(searcher.getIndexReader());
     HashSet<Term> queryTerms = new HashSet<>();
-    searcher.createWeight(q, true).extractTerms(queryTerms);
+    searcher.createWeight(q, true, 1f).extractTerms(queryTerms);
     assertTrue("Should have variant smith", queryTerms.contains(new Term("name", "smith")));
     TopDocs topDocs = searcher.search(flt, 1);
     ScoreDoc[] sd = topDocs.scoreDocs;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/sandbox/src/test/org/apache/lucene/sandbox/queries/TestSlowFuzzyQuery2.java
----------------------------------------------------------------------
diff --git a/lucene/sandbox/src/test/org/apache/lucene/sandbox/queries/TestSlowFuzzyQuery2.java b/lucene/sandbox/src/test/org/apache/lucene/sandbox/queries/TestSlowFuzzyQuery2.java
deleted file mode 100644
index 84145a1..0000000
--- a/lucene/sandbox/src/test/org/apache/lucene/sandbox/queries/TestSlowFuzzyQuery2.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.lucene.sandbox.queries;
-
-import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.nio.charset.StandardCharsets;
-
-import org.apache.lucene.analysis.Analyzer;
-import org.apache.lucene.analysis.MockAnalyzer;
-import org.apache.lucene.analysis.MockTokenizer;
-import org.apache.lucene.document.Document;
-import org.apache.lucene.document.Field;
-import org.apache.lucene.index.IndexReader;
-import org.apache.lucene.index.RandomIndexWriter;
-import org.apache.lucene.index.Term;
-import org.apache.lucene.search.IndexSearcher;
-import org.apache.lucene.search.MultiTermQuery;
-import org.apache.lucene.search.TopDocs;
-import org.apache.lucene.search.similarities.ClassicSimilarity;
-import org.apache.lucene.store.Directory;
-import org.apache.lucene.util.IOUtils;
-import org.apache.lucene.util.LuceneTestCase;
-
-/** 
- * Tests the results of fuzzy against pre-recorded output 
- * The format of the file is the following:
- * 
- * Header Row: # of bits: generate 2^n sequential documents 
- * with a value of Integer.toBinaryString
- * 
- * Entries: an entry is a param spec line, a resultCount line, and
- * then 'resultCount' results lines. The results lines are in the
- * expected order.
- * 
- * param spec line: a comma-separated list of params to FuzzyQuery
- *   (query, prefixLen, pqSize, minScore)
- * query = query text as a number (expand with Integer.toBinaryString)
- * prefixLen = prefix length
- * pqSize = priority queue maximum size for TopTermsBoostOnlyBooleanQueryRewrite
- * minScore = minimum similarity
- * 
- * resultCount line: total number of expected hits.
- * 
- * results line: comma-separated docID, score pair
- **/
-public class TestSlowFuzzyQuery2 extends LuceneTestCase {
-  /** epsilon for score comparisons */
-  static final float epsilon = 0.00001f;
-
-  static int[][] mappings = new int[][] {
-    new int[] { 0x40, 0x41 },
-    new int[] { 0x40, 0x0195 },
-    new int[] { 0x40, 0x0906 },
-    new int[] { 0x40, 0x1040F },
-    new int[] { 0x0194, 0x0195 },
-    new int[] { 0x0194, 0x0906 },
-    new int[] { 0x0194, 0x1040F },
-    new int[] { 0x0905, 0x0906 },
-    new int[] { 0x0905, 0x1040F },
-    new int[] { 0x1040E, 0x1040F }
-  };
-  public void testFromTestData() throws Exception {
-    // TODO: randomize!
-    assertFromTestData(mappings[random().nextInt(mappings.length)]);
-  }
-
-  public void assertFromTestData(int codePointTable[]) throws Exception {
-    if (VERBOSE) {
-      System.out.println("TEST: codePointTable=" + codePointTable);
-    }
-    InputStream stream = getClass().getResourceAsStream("fuzzyTestData.txt");
-    BufferedReader reader = new BufferedReader(new InputStreamReader(stream, StandardCharsets.UTF_8));
-    
-    int bits = Integer.parseInt(reader.readLine());
-    int terms = (int) Math.pow(2, bits);
-    
-    Directory dir = newDirectory();
-    Analyzer analyzer = new MockAnalyzer(random(), MockTokenizer.KEYWORD, false);
-    RandomIndexWriter writer = new RandomIndexWriter(random(), dir, newIndexWriterConfig(analyzer).setMergePolicy(newLogMergePolicy()));
-
-    Document doc = new Document();
-    Field field = newTextField("field", "", Field.Store.NO);
-    doc.add(field);
-    
-    for (int i = 0; i < terms; i++) {
-      field.setStringValue(mapInt(codePointTable, i));
-      writer.addDocument(doc);
-    }   
-    
-    IndexReader r = writer.getReader();
-    IndexSearcher searcher = newSearcher(r);
-    if (VERBOSE) {
-      System.out.println("TEST: searcher=" + searcher);
-    }
-    // even though this uses a boost-only rewrite, this test relies upon queryNorm being the default implementation,
-    // otherwise scores are different!
-    searcher.setSimilarity(new ClassicSimilarity());
-    
-    writer.close();
-    String line;
-    while ((line = reader.readLine()) != null) {
-      String params[] = line.split(",");
-      String query = mapInt(codePointTable, Integer.parseInt(params[0]));
-      int prefix = Integer.parseInt(params[1]);
-      int pqSize = Integer.parseInt(params[2]);
-      float minScore = Float.parseFloat(params[3]);
-      SlowFuzzyQuery q = new SlowFuzzyQuery(new Term("field", query), minScore, prefix);
-      q.setRewriteMethod(new MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite(pqSize));
-      int expectedResults = Integer.parseInt(reader.readLine());
-      TopDocs docs = searcher.search(q, expectedResults);
-      assertEquals(expectedResults, docs.totalHits);
-      for (int i = 0; i < expectedResults; i++) {
-        String scoreDoc[] = reader.readLine().split(",");
-        assertEquals(Integer.parseInt(scoreDoc[0]), docs.scoreDocs[i].doc);
-        assertEquals(Float.parseFloat(scoreDoc[1]), docs.scoreDocs[i].score, epsilon);
-      }
-    }
-    IOUtils.close(r, dir, analyzer);
-  }
-  
-  /* map bits to unicode codepoints */
-  private static String mapInt(int codePointTable[], int i) {
-    StringBuilder sb = new StringBuilder();
-    String binary = Integer.toBinaryString(i);
-    for (int j = 0; j < binary.length(); j++)
-      sb.appendCodePoint(codePointTable[binary.charAt(j) - '0']);
-    return sb.toString();
-  }
-
-  /* Code to generate test data
-  public static void main(String args[]) throws Exception {
-    int bits = 3;
-    System.out.println(bits);
-    int terms = (int) Math.pow(2, bits);
-    
-    RAMDirectory dir = new RAMDirectory();
-    IndexWriter writer = new IndexWriter(dir, new KeywordAnalyzer(),
-        IndexWriter.MaxFieldLength.UNLIMITED);
-    
-    Document doc = new Document();
-    Field field = newField("field", "", Field.Store.NO, Field.Index.ANALYZED);
-    doc.add(field);
-
-    for (int i = 0; i < terms; i++) {
-      field.setValue(Integer.toBinaryString(i));
-      writer.addDocument(doc);
-    }
-    
-    writer.forceMerge(1);
-    writer.close();
-
-    IndexSearcher searcher = new IndexSearcher(dir);
-    for (int prefix = 0; prefix < bits; prefix++)
-      for (int pqsize = 1; pqsize <= terms; pqsize++)
-        for (float minscore = 0.1F; minscore < 1F; minscore += 0.2F)
-          for (int query = 0; query < terms; query++) {
-            FuzzyQuery q = new FuzzyQuery(
-                new Term("field", Integer.toBinaryString(query)), minscore, prefix);
-            q.setRewriteMethod(new MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite(pqsize));
-            System.out.println(query + "," + prefix + "," + pqsize + "," + minscore);
-            TopDocs docs = searcher.search(q, terms);
-            System.out.println(docs.totalHits);
-            for (int i = 0; i < docs.totalHits; i++)
-              System.out.println(docs.scoreDocs[i].doc + "," + docs.scoreDocs[i].score);
-          }
-  }
-  */
-}


[2/5] lucene-solr:master: LUCENE-7368: Remove queryNorm.

Posted by jp...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/sandbox/src/test/org/apache/lucene/sandbox/queries/fuzzyTestData.txt
----------------------------------------------------------------------
diff --git a/lucene/sandbox/src/test/org/apache/lucene/sandbox/queries/fuzzyTestData.txt b/lucene/sandbox/src/test/org/apache/lucene/sandbox/queries/fuzzyTestData.txt
deleted file mode 100644
index b759da7..0000000
--- a/lucene/sandbox/src/test/org/apache/lucene/sandbox/queries/fuzzyTestData.txt
+++ /dev/null
@@ -1,3721 +0,0 @@
-3
-0,0,1,0.1
-1
-0,1.0
-1,0,1,0.1
-1
-1,1.0
-2,0,1,0.1
-1
-2,1.0
-3,0,1,0.1
-1
-3,1.0
-4,0,1,0.1
-1
-4,1.0
-5,0,1,0.1
-1
-5,1.0
-6,0,1,0.1
-1
-6,1.0
-7,0,1,0.1
-1
-7,1.0
-0,0,1,0.3
-1
-0,1.0
-1,0,1,0.3
-1
-1,1.0
-2,0,1,0.3
-1
-2,1.0
-3,0,1,0.3
-1
-3,1.0
-4,0,1,0.3
-1
-4,1.0
-5,0,1,0.3
-1
-5,1.0
-6,0,1,0.3
-1
-6,1.0
-7,0,1,0.3
-1
-7,1.0
-0,0,1,0.5
-1
-0,1.0
-1,0,1,0.5
-1
-1,1.0
-2,0,1,0.5
-1
-2,1.0
-3,0,1,0.5
-1
-3,1.0
-4,0,1,0.5
-1
-4,1.0
-5,0,1,0.5
-1
-5,1.0
-6,0,1,0.5
-1
-6,1.0
-7,0,1,0.5
-1
-7,1.0
-0,0,1,0.7
-1
-0,1.0
-1,0,1,0.7
-1
-1,1.0
-2,0,1,0.7
-1
-2,1.0
-3,0,1,0.7
-1
-3,1.0
-4,0,1,0.7
-1
-4,1.0
-5,0,1,0.7
-1
-5,1.0
-6,0,1,0.7
-1
-6,1.0
-7,0,1,0.7
-1
-7,1.0
-0,0,1,0.9
-1
-0,1.0
-1,0,1,0.9
-1
-1,1.0
-2,0,1,0.9
-1
-2,1.0
-3,0,1,0.9
-1
-3,1.0
-4,0,1,0.9
-1
-4,1.0
-5,0,1,0.9
-1
-5,1.0
-6,0,1,0.9
-1
-6,1.0
-7,0,1,0.9
-1
-7,1.0
-0,0,2,0.1
-1
-0,1.0
-1,0,2,0.1
-1
-1,1.0
-2,0,2,0.1
-2
-2,0.91381156
-4,0.4061385
-3,0,2,0.1
-2
-3,0.91381156
-2,0.4061385
-4,0,2,0.1
-2
-4,0.84623283
-5,0.53281325
-5,0,2,0.1
-2
-5,0.84623283
-4,0.53281325
-6,0,2,0.1
-2
-6,0.84623283
-4,0.53281325
-7,0,2,0.1
-2
-7,0.84623283
-5,0.53281325
-0,0,2,0.3
-1
-0,1.0
-1,0,2,0.3
-1
-1,1.0
-2,0,2,0.3
-2
-2,0.96152395
-4,0.27472112
-3,0,2,0.3
-2
-3,0.96152395
-2,0.27472112
-4,0,2,0.3
-2
-4,0.88583153
-5,0.4640069
-5,0,2,0.3
-2
-5,0.88583153
-4,0.4640069
-6,0,2,0.3
-2
-6,0.88583153
-4,0.4640069
-7,0,2,0.3
-2
-7,0.88583153
-5,0.4640069
-0,0,2,0.5
-1
-0,1.0
-1,0,2,0.5
-1
-1,1.0
-2,0,2,0.5
-1
-2,1.0
-3,0,2,0.5
-1
-3,1.0
-4,0,2,0.5
-2
-4,0.9486833
-5,0.3162277
-5,0,2,0.5
-2
-5,0.9486833
-4,0.3162277
-6,0,2,0.5
-2
-6,0.9486833
-4,0.3162277
-7,0,2,0.5
-2
-7,0.9486833
-5,0.3162277
-0,0,2,0.7
-1
-0,1.0
-1,0,2,0.7
-1
-1,1.0
-2,0,2,0.7
-1
-2,1.0
-3,0,2,0.7
-1
-3,1.0
-4,0,2,0.7
-1
-4,1.0
-5,0,2,0.7
-1
-5,1.0
-6,0,2,0.7
-1
-6,1.0
-7,0,2,0.7
-1
-7,1.0
-0,0,2,0.9
-1
-0,1.0
-1,0,2,0.9
-1
-1,1.0
-2,0,2,0.9
-1
-2,1.0
-3,0,2,0.9
-1
-3,1.0
-4,0,2,0.9
-1
-4,1.0
-5,0,2,0.9
-1
-5,1.0
-6,0,2,0.9
-1
-6,1.0
-7,0,2,0.9
-1
-7,1.0
-0,0,3,0.1
-1
-0,1.0
-1,0,3,0.1
-1
-1,1.0
-2,0,3,0.1
-3
-2,0.84664875
-4,0.37628835
-5,0.37628835
-3,0,3,0.1
-3
-3,0.84664875
-2,0.37628835
-5,0.37628835
-4,0,3,0.1
-3
-4,0.74683726
-5,0.47023085
-6,0.47023085
-5,0,3,0.1
-3
-5,0.74683726
-4,0.47023085
-7,0.47023085
-6,0,3,0.1
-3
-6,0.74683726
-4,0.47023085
-7,0.47023085
-7,0,3,0.1
-3
-7,0.74683726
-5,0.47023085
-6,0.47023085
-0,0,3,0.3
-1
-0,1.0
-1,0,3,0.3
-1
-1,1.0
-2,0,3,0.3
-3
-2,0.92717266
-4,0.26490647
-5,0.26490647
-3,0,3,0.3
-3
-3,0.92717266
-2,0.26490647
-5,0.26490647
-4,0,3,0.3
-3
-4,0.8035427
-5,0.42090324
-6,0.42090324
-5,0,3,0.3
-3
-5,0.80354273
-4,0.42090327
-7,0.42090327
-6,0,3,0.3
-3
-6,0.80354273
-4,0.42090327
-7,0.42090327
-7,0,3,0.3
-3
-7,0.8035427
-5,0.42090324
-6,0.42090324
-0,0,3,0.5
-1
-0,1.0
-1,0,3,0.5
-1
-1,1.0
-2,0,3,0.5
-1
-2,1.0
-3,0,3,0.5
-1
-3,1.0
-4,0,3,0.5
-3
-4,0.9045341
-5,0.3015113
-6,0.3015113
-5,0,3,0.5
-3
-5,0.9045341
-4,0.3015113
-7,0.3015113
-6,0,3,0.5
-3
-6,0.9045341
-4,0.3015113
-7,0.3015113
-7,0,3,0.5
-3
-7,0.9045341
-5,0.3015113
-6,0.3015113
-0,0,3,0.7
-1
-0,1.0
-1,0,3,0.7
-1
-1,1.0
-2,0,3,0.7
-1
-2,1.0
-3,0,3,0.7
-1
-3,1.0
-4,0,3,0.7
-1
-4,1.0
-5,0,3,0.7
-1
-5,1.0
-6,0,3,0.7
-1
-6,1.0
-7,0,3,0.7
-1
-7,1.0
-0,0,3,0.9
-1
-0,1.0
-1,0,3,0.9
-1
-1,1.0
-2,0,3,0.9
-1
-2,1.0
-3,0,3,0.9
-1
-3,1.0
-4,0,3,0.9
-1
-4,1.0
-5,0,3,0.9
-1
-5,1.0
-6,0,3,0.9
-1
-6,1.0
-7,0,3,0.9
-1
-7,1.0
-0,0,4,0.1
-1
-0,1.0
-1,0,4,0.1
-1
-1,1.0
-2,0,4,0.1
-4
-2,0.7924058
-3,0.35218036
-4,0.35218036
-5,0.35218036
-3,0,4,0.1
-4
-3,0.79240584
-2,0.3521804
-5,0.3521804
-6,0.3521804
-4,0,4,0.1
-4
-4,0.7088104
-5,0.44628802
-6,0.44628802
-2,0.31502685
-5,0,4,0.1
-4
-5,0.7088104
-4,0.44628802
-7,0.44628802
-2,0.31502685
-6,0,4,0.1
-4
-6,0.7088104
-4,0.44628802
-7,0.44628802
-2,0.31502685
-7,0,4,0.1
-4
-7,0.7088104
-5,0.44628802
-6,0.44628802
-3,0.31502685
-0,0,4,0.3
-1
-0,1.0
-1,0,4,0.3
-1
-1,1.0
-2,0,4,0.3
-4
-2,0.8962582
-3,0.25607374
-4,0.25607374
-5,0.25607374
-3,0,4,0.3
-4
-3,0.8962582
-2,0.25607374
-5,0.25607374
-6,0.25607374
-4,0,4,0.3
-4
-4,0.7831679
-5,0.41023073
-6,0.41023073
-2,0.22376224
-5,0,4,0.3
-4
-5,0.7831679
-4,0.41023073
-7,0.41023073
-2,0.22376224
-6,0,4,0.3
-4
-6,0.7831679
-4,0.41023073
-7,0.41023073
-2,0.22376224
-7,0,4,0.3
-4
-7,0.7831679
-5,0.41023073
-6,0.41023073
-3,0.22376224
-0,0,4,0.5
-1
-0,1.0
-1,0,4,0.5
-1
-1,1.0
-2,0,4,0.5
-1
-2,1.0
-3,0,4,0.5
-1
-3,1.0
-4,0,4,0.5
-3
-4,0.9045341
-5,0.3015113
-6,0.3015113
-5,0,4,0.5
-3
-5,0.9045341
-4,0.3015113
-7,0.3015113
-6,0,4,0.5
-3
-6,0.9045341
-4,0.3015113
-7,0.3015113
-7,0,4,0.5
-3
-7,0.9045341
-5,0.3015113
-6,0.3015113
-0,0,4,0.7
-1
-0,1.0
-1,0,4,0.7
-1
-1,1.0
-2,0,4,0.7
-1
-2,1.0
-3,0,4,0.7
-1
-3,1.0
-4,0,4,0.7
-1
-4,1.0
-5,0,4,0.7
-1
-5,1.0
-6,0,4,0.7
-1
-6,1.0
-7,0,4,0.7
-1
-7,1.0
-0,0,4,0.9
-1
-0,1.0
-1,0,4,0.9
-1
-1,1.0
-2,0,4,0.9
-1
-2,1.0
-3,0,4,0.9
-1
-3,1.0
-4,0,4,0.9
-1
-4,1.0
-5,0,4,0.9
-1
-5,1.0
-6,0,4,0.9
-1
-6,1.0
-7,0,4,0.9
-1
-7,1.0
-0,0,5,0.1
-1
-0,1.0
-1,0,5,0.1
-1
-1,1.0
-2,0,5,0.1
-5
-2,0.7474093
-3,0.33218193
-4,0.33218193
-5,0.33218193
-6,0.33218193
-3,0,5,0.1
-5
-3,0.74740934
-2,0.33218196
-5,0.33218196
-6,0.33218196
-7,0.33218196
-4,0,5,0.1
-5
-4,0.697137
-5,0.4389381
-6,0.4389381
-2,0.30983868
-7,0.18073922
-5,0,5,0.1
-5
-5,0.67605716
-4,0.42566562
-7,0.42566562
-2,0.30046988
-3,0.30046988
-6,0,5,0.1
-5
-6,0.67605716
-4,0.42566562
-7,0.42566562
-2,0.30046988
-3,0.30046988
-7,0,5,0.1
-5
-7,0.697137
-5,0.4389381
-6,0.4389381
-3,0.30983868
-4,0.18073922
-0,0,5,0.3
-1
-0,1.0
-1,0,5,0.3
-1
-1,1.0
-2,0,5,0.3
-5
-2,0.86824316
-3,0.24806947
-4,0.24806947
-5,0.24806947
-6,0.24806947
-3,0,5,0.3
-5
-3,0.8682432
-2,0.24806948
-5,0.24806948
-6,0.24806948
-7,0.24806948
-4,0,5,0.3
-5
-4,0.7826238
-5,0.40994576
-6,0.40994576
-2,0.2236068
-7,0.037267767
-5,0,5,0.3
-5
-5,0.7642683
-4,0.40033093
-7,0.40033093
-2,0.21836235
-3,0.21836235
-6,0,5,0.3
-5
-6,0.7642683
-4,0.40033093
-7,0.40033093
-2,0.21836235
-3,0.21836235
-7,0,5,0.3
-5
-7,0.7826238
-5,0.40994576
-6,0.40994576
-3,0.2236068
-4,0.037267767
-0,0,5,0.5
-1
-0,1.0
-1,0,5,0.5
-1
-1,1.0
-2,0,5,0.5
-1
-2,1.0
-3,0,5,0.5
-1
-3,1.0
-4,0,5,0.5
-3
-4,0.9045341
-5,0.3015113
-6,0.3015113
-5,0,5,0.5
-3
-5,0.9045341
-4,0.3015113
-7,0.3015113
-6,0,5,0.5
-3
-6,0.9045341
-4,0.3015113
-7,0.3015113
-7,0,5,0.5
-3
-7,0.9045341
-5,0.3015113
-6,0.3015113
-0,0,5,0.7
-1
-0,1.0
-1,0,5,0.7
-1
-1,1.0
-2,0,5,0.7
-1
-2,1.0
-3,0,5,0.7
-1
-3,1.0
-4,0,5,0.7
-1
-4,1.0
-5,0,5,0.7
-1
-5,1.0
-6,0,5,0.7
-1
-6,1.0
-7,0,5,0.7
-1
-7,1.0
-0,0,5,0.9
-1
-0,1.0
-1,0,5,0.9
-1
-1,1.0
-2,0,5,0.9
-1
-2,1.0
-3,0,5,0.9
-1
-3,1.0
-4,0,5,0.9
-1
-4,1.0
-5,0,5,0.9
-1
-5,1.0
-6,0,5,0.9
-1
-6,1.0
-7,0,5,0.9
-1
-7,1.0
-0,0,6,0.1
-1
-0,1.0
-1,0,6,0.1
-1
-1,1.0
-2,0,6,0.1
-5
-2,0.7474093
-3,0.33218193
-4,0.33218193
-5,0.33218193
-6,0.33218193
-3,0,6,0.1
-5
-3,0.74740934
-2,0.33218196
-5,0.33218196
-6,0.33218196
-7,0.33218196
-4,0,6,0.1
-5
-4,0.697137
-5,0.4389381
-6,0.4389381
-2,0.30983868
-7,0.18073922
-5,0,6,0.1
-6
-5,0.6659059
-4,0.41927406
-7,0.41927406
-2,0.2959582
-3,0.2959582
-6,0.17264226
-6,0,6,0.1
-6
-6,0.6659059
-4,0.41927406
-7,0.41927406
-2,0.2959582
-3,0.2959582
-5,0.17264226
-7,0,6,0.1
-5
-7,0.697137
-5,0.4389381
-6,0.4389381
-3,0.30983868
-4,0.18073922
-0,0,6,0.3
-1
-0,1.0
-1,0,6,0.3
-1
-1,1.0
-2,0,6,0.3
-5
-2,0.86824316
-3,0.24806947
-4,0.24806947
-5,0.24806947
-6,0.24806947
-3,0,6,0.3
-5
-3,0.8682432
-2,0.24806948
-5,0.24806948
-6,0.24806948
-7,0.24806948
-4,0,6,0.3
-5
-4,0.7826238
-5,0.40994576
-6,0.40994576
-2,0.2236068
-7,0.037267767
-5,0,6,0.3
-6
-5,0.76376265
-4,0.40006608
-7,0.40006608
-2,0.2182179
-3,0.2182179
-6,0.036369618
-6,0,6,0.3
-6
-6,0.76376265
-4,0.40006608
-7,0.40006608
-2,0.2182179
-3,0.2182179
-5,0.036369618
-7,0,6,0.3
-5
-7,0.7826238
-5,0.40994576
-6,0.40994576
-3,0.2236068
-4,0.037267767
-0,0,6,0.5
-1
-0,1.0
-1,0,6,0.5
-1
-1,1.0
-2,0,6,0.5
-1
-2,1.0
-3,0,6,0.5
-1
-3,1.0
-4,0,6,0.5
-3
-4,0.9045341
-5,0.3015113
-6,0.3015113
-5,0,6,0.5
-3
-5,0.9045341
-4,0.3015113
-7,0.3015113
-6,0,6,0.5
-3
-6,0.9045341
-4,0.3015113
-7,0.3015113
-7,0,6,0.5
-3
-7,0.9045341
-5,0.3015113
-6,0.3015113
-0,0,6,0.7
-1
-0,1.0
-1,0,6,0.7
-1
-1,1.0
-2,0,6,0.7
-1
-2,1.0
-3,0,6,0.7
-1
-3,1.0
-4,0,6,0.7
-1
-4,1.0
-5,0,6,0.7
-1
-5,1.0
-6,0,6,0.7
-1
-6,1.0
-7,0,6,0.7
-1
-7,1.0
-0,0,6,0.9
-1
-0,1.0
-1,0,6,0.9
-1
-1,1.0
-2,0,6,0.9
-1
-2,1.0
-3,0,6,0.9
-1
-3,1.0
-4,0,6,0.9
-1
-4,1.0
-5,0,6,0.9
-1
-5,1.0
-6,0,6,0.9
-1
-6,1.0
-7,0,6,0.9
-1
-7,1.0
-0,0,7,0.1
-1
-0,1.0
-1,0,7,0.1
-1
-1,1.0
-2,0,7,0.1
-5
-2,0.7474093
-3,0.33218193
-4,0.33218193
-5,0.33218193
-6,0.33218193
-3,0,7,0.1
-5
-3,0.74740934
-2,0.33218196
-5,0.33218196
-6,0.33218196
-7,0.33218196
-4,0,7,0.1
-5
-4,0.697137
-5,0.4389381
-6,0.4389381
-2,0.30983868
-7,0.18073922
-5,0,7,0.1
-6
-5,0.6659059
-4,0.41927406
-7,0.41927406
-2,0.2959582
-3,0.2959582
-6,0.17264226
-6,0,7,0.1
-6
-6,0.6659059
-4,0.41927406
-7,0.41927406
-2,0.2959582
-3,0.2959582
-5,0.17264226
-7,0,7,0.1
-5
-7,0.697137
-5,0.4389381
-6,0.4389381
-3,0.30983868
-4,0.18073922
-0,0,7,0.3
-1
-0,1.0
-1,0,7,0.3
-1
-1,1.0
-2,0,7,0.3
-5
-2,0.86824316
-3,0.24806947
-4,0.24806947
-5,0.24806947
-6,0.24806947
-3,0,7,0.3
-5
-3,0.8682432
-2,0.24806948
-5,0.24806948
-6,0.24806948
-7,0.24806948
-4,0,7,0.3
-5
-4,0.7826238
-5,0.40994576
-6,0.40994576
-2,0.2236068
-7,0.037267767
-5,0,7,0.3
-6
-5,0.76376265
-4,0.40006608
-7,0.40006608
-2,0.2182179
-3,0.2182179
-6,0.036369618
-6,0,7,0.3
-6
-6,0.76376265
-4,0.40006608
-7,0.40006608
-2,0.2182179
-3,0.2182179
-5,0.036369618
-7,0,7,0.3
-5
-7,0.7826238
-5,0.40994576
-6,0.40994576
-3,0.2236068
-4,0.037267767
-0,0,7,0.5
-1
-0,1.0
-1,0,7,0.5
-1
-1,1.0
-2,0,7,0.5
-1
-2,1.0
-3,0,7,0.5
-1
-3,1.0
-4,0,7,0.5
-3
-4,0.9045341
-5,0.3015113
-6,0.3015113
-5,0,7,0.5
-3
-5,0.9045341
-4,0.3015113
-7,0.3015113
-6,0,7,0.5
-3
-6,0.9045341
-4,0.3015113
-7,0.3015113
-7,0,7,0.5
-3
-7,0.9045341
-5,0.3015113
-6,0.3015113
-0,0,7,0.7
-1
-0,1.0
-1,0,7,0.7
-1
-1,1.0
-2,0,7,0.7
-1
-2,1.0
-3,0,7,0.7
-1
-3,1.0
-4,0,7,0.7
-1
-4,1.0
-5,0,7,0.7
-1
-5,1.0
-6,0,7,0.7
-1
-6,1.0
-7,0,7,0.7
-1
-7,1.0
-0,0,7,0.9
-1
-0,1.0
-1,0,7,0.9
-1
-1,1.0
-2,0,7,0.9
-1
-2,1.0
-3,0,7,0.9
-1
-3,1.0
-4,0,7,0.9
-1
-4,1.0
-5,0,7,0.9
-1
-5,1.0
-6,0,7,0.9
-1
-6,1.0
-7,0,7,0.9
-1
-7,1.0
-0,0,8,0.1
-1
-0,1.0
-1,0,8,0.1
-1
-1,1.0
-2,0,8,0.1
-5
-2,0.7474093
-3,0.33218193
-4,0.33218193
-5,0.33218193
-6,0.33218193
-3,0,8,0.1
-5
-3,0.74740934
-2,0.33218196
-5,0.33218196
-6,0.33218196
-7,0.33218196
-4,0,8,0.1
-5
-4,0.697137
-5,0.4389381
-6,0.4389381
-2,0.30983868
-7,0.18073922
-5,0,8,0.1
-6
-5,0.6659059
-4,0.41927406
-7,0.41927406
-2,0.2959582
-3,0.2959582
-6,0.17264226
-6,0,8,0.1
-6
-6,0.6659059
-4,0.41927406
-7,0.41927406
-2,0.2959582
-3,0.2959582
-5,0.17264226
-7,0,8,0.1
-5
-7,0.697137
-5,0.4389381
-6,0.4389381
-3,0.30983868
-4,0.18073922
-0,0,8,0.3
-1
-0,1.0
-1,0,8,0.3
-1
-1,1.0
-2,0,8,0.3
-5
-2,0.86824316
-3,0.24806947
-4,0.24806947
-5,0.24806947
-6,0.24806947
-3,0,8,0.3
-5
-3,0.8682432
-2,0.24806948
-5,0.24806948
-6,0.24806948
-7,0.24806948
-4,0,8,0.3
-5
-4,0.7826238
-5,0.40994576
-6,0.40994576
-2,0.2236068
-7,0.037267767
-5,0,8,0.3
-6
-5,0.76376265
-4,0.40006608
-7,0.40006608
-2,0.2182179
-3,0.2182179
-6,0.036369618
-6,0,8,0.3
-6
-6,0.76376265
-4,0.40006608
-7,0.40006608
-2,0.2182179
-3,0.2182179
-5,0.036369618
-7,0,8,0.3
-5
-7,0.7826238
-5,0.40994576
-6,0.40994576
-3,0.2236068
-4,0.037267767
-0,0,8,0.5
-1
-0,1.0
-1,0,8,0.5
-1
-1,1.0
-2,0,8,0.5
-1
-2,1.0
-3,0,8,0.5
-1
-3,1.0
-4,0,8,0.5
-3
-4,0.9045341
-5,0.3015113
-6,0.3015113
-5,0,8,0.5
-3
-5,0.9045341
-4,0.3015113
-7,0.3015113
-6,0,8,0.5
-3
-6,0.9045341
-4,0.3015113
-7,0.3015113
-7,0,8,0.5
-3
-7,0.9045341
-5,0.3015113
-6,0.3015113
-0,0,8,0.7
-1
-0,1.0
-1,0,8,0.7
-1
-1,1.0
-2,0,8,0.7
-1
-2,1.0
-3,0,8,0.7
-1
-3,1.0
-4,0,8,0.7
-1
-4,1.0
-5,0,8,0.7
-1
-5,1.0
-6,0,8,0.7
-1
-6,1.0
-7,0,8,0.7
-1
-7,1.0
-0,0,8,0.9
-1
-0,1.0
-1,0,8,0.9
-1
-1,1.0
-2,0,8,0.9
-1
-2,1.0
-3,0,8,0.9
-1
-3,1.0
-4,0,8,0.9
-1
-4,1.0
-5,0,8,0.9
-1
-5,1.0
-6,0,8,0.9
-1
-6,1.0
-7,0,8,0.9
-1
-7,1.0
-0,1,1,0.1
-1
-0,1.0
-1,1,1,0.1
-1
-1,1.0
-2,1,1,0.1
-1
-2,1.0
-3,1,1,0.1
-1
-3,1.0
-4,1,1,0.1
-1
-4,1.0
-5,1,1,0.1
-1
-5,1.0
-6,1,1,0.1
-1
-6,1.0
-7,1,1,0.1
-1
-7,1.0
-0,1,1,0.3
-1
-0,1.0
-1,1,1,0.3
-1
-1,1.0
-2,1,1,0.3
-1
-2,1.0
-3,1,1,0.3
-1
-3,1.0
-4,1,1,0.3
-1
-4,1.0
-5,1,1,0.3
-1
-5,1.0
-6,1,1,0.3
-1
-6,1.0
-7,1,1,0.3
-1
-7,1.0
-0,1,1,0.5
-1
-0,1.0
-1,1,1,0.5
-1
-1,1.0
-2,1,1,0.5
-1
-2,1.0
-3,1,1,0.5
-1
-3,1.0
-4,1,1,0.5
-1
-4,1.0
-5,1,1,0.5
-1
-5,1.0
-6,1,1,0.5
-1
-6,1.0
-7,1,1,0.5
-1
-7,1.0
-0,1,1,0.7
-1
-0,1.0
-1,1,1,0.7
-1
-1,1.0
-2,1,1,0.7
-1
-2,1.0
-3,1,1,0.7
-1
-3,1.0
-4,1,1,0.7
-1
-4,1.0
-5,1,1,0.7
-1
-5,1.0
-6,1,1,0.7
-1
-6,1.0
-7,1,1,0.7
-1
-7,1.0
-0,1,1,0.9
-1
-0,1.0
-1,1,1,0.9
-1
-1,1.0
-2,1,1,0.9
-1
-2,1.0
-3,1,1,0.9
-1
-3,1.0
-4,1,1,0.9
-1
-4,1.0
-5,1,1,0.9
-1
-5,1.0
-6,1,1,0.9
-1
-6,1.0
-7,1,1,0.9
-1
-7,1.0
-0,1,2,0.1
-1
-0,1.0
-1,1,2,0.1
-1
-1,1.0
-2,1,2,0.1
-2
-2,0.91381156
-4,0.4061385
-3,1,2,0.1
-2
-3,0.91381156
-2,0.4061385
-4,1,2,0.1
-2
-4,0.84623283
-5,0.53281325
-5,1,2,0.1
-2
-5,0.84623283
-4,0.53281325
-6,1,2,0.1
-2
-6,0.84623283
-4,0.53281325
-7,1,2,0.1
-2
-7,0.84623283
-5,0.53281325
-0,1,2,0.3
-1
-0,1.0
-1,1,2,0.3
-1
-1,1.0
-2,1,2,0.3
-2
-2,0.96152395
-4,0.27472112
-3,1,2,0.3
-2
-3,0.96152395
-2,0.27472112
-4,1,2,0.3
-2
-4,0.88583153
-5,0.4640069
-5,1,2,0.3
-2
-5,0.88583153
-4,0.4640069
-6,1,2,0.3
-2
-6,0.88583153
-4,0.4640069
-7,1,2,0.3
-2
-7,0.88583153
-5,0.4640069
-0,1,2,0.5
-1
-0,1.0
-1,1,2,0.5
-1
-1,1.0
-2,1,2,0.5
-1
-2,1.0
-3,1,2,0.5
-1
-3,1.0
-4,1,2,0.5
-2
-4,0.9486833
-5,0.3162277
-5,1,2,0.5
-2
-5,0.9486833
-4,0.3162277
-6,1,2,0.5
-2
-6,0.9486833
-4,0.3162277
-7,1,2,0.5
-2
-7,0.9486833
-5,0.3162277
-0,1,2,0.7
-1
-0,1.0
-1,1,2,0.7
-1
-1,1.0
-2,1,2,0.7
-1
-2,1.0
-3,1,2,0.7
-1
-3,1.0
-4,1,2,0.7
-1
-4,1.0
-5,1,2,0.7
-1
-5,1.0
-6,1,2,0.7
-1
-6,1.0
-7,1,2,0.7
-1
-7,1.0
-0,1,2,0.9
-1
-0,1.0
-1,1,2,0.9
-1
-1,1.0
-2,1,2,0.9
-1
-2,1.0
-3,1,2,0.9
-1
-3,1.0
-4,1,2,0.9
-1
-4,1.0
-5,1,2,0.9
-1
-5,1.0
-6,1,2,0.9
-1
-6,1.0
-7,1,2,0.9
-1
-7,1.0
-0,1,3,0.1
-1
-0,1.0
-1,1,3,0.1
-1
-1,1.0
-2,1,3,0.1
-3
-2,0.84664875
-4,0.37628835
-5,0.37628835
-3,1,3,0.1
-3
-3,0.84664875
-2,0.37628835
-5,0.37628835
-4,1,3,0.1
-3
-4,0.74683726
-5,0.47023085
-6,0.47023085
-5,1,3,0.1
-3
-5,0.74683726
-4,0.47023085
-7,0.47023085
-6,1,3,0.1
-3
-6,0.74683726
-4,0.47023085
-7,0.47023085
-7,1,3,0.1
-3
-7,0.74683726
-5,0.47023085
-6,0.47023085
-0,1,3,0.3
-1
-0,1.0
-1,1,3,0.3
-1
-1,1.0
-2,1,3,0.3
-3
-2,0.92717266
-4,0.26490647
-5,0.26490647
-3,1,3,0.3
-3
-3,0.92717266
-2,0.26490647
-5,0.26490647
-4,1,3,0.3
-3
-4,0.8035427
-5,0.42090324
-6,0.42090324
-5,1,3,0.3
-3
-5,0.80354273
-4,0.42090327
-7,0.42090327
-6,1,3,0.3
-3
-6,0.80354273
-4,0.42090327
-7,0.42090327
-7,1,3,0.3
-3
-7,0.8035427
-5,0.42090324
-6,0.42090324
-0,1,3,0.5
-1
-0,1.0
-1,1,3,0.5
-1
-1,1.0
-2,1,3,0.5
-1
-2,1.0
-3,1,3,0.5
-1
-3,1.0
-4,1,3,0.5
-3
-4,0.9045341
-5,0.3015113
-6,0.3015113
-5,1,3,0.5
-3
-5,0.9045341
-4,0.3015113
-7,0.3015113
-6,1,3,0.5
-3
-6,0.9045341
-4,0.3015113
-7,0.3015113
-7,1,3,0.5
-3
-7,0.9045341
-5,0.3015113
-6,0.3015113
-0,1,3,0.7
-1
-0,1.0
-1,1,3,0.7
-1
-1,1.0
-2,1,3,0.7
-1
-2,1.0
-3,1,3,0.7
-1
-3,1.0
-4,1,3,0.7
-1
-4,1.0
-5,1,3,0.7
-1
-5,1.0
-6,1,3,0.7
-1
-6,1.0
-7,1,3,0.7
-1
-7,1.0
-0,1,3,0.9
-1
-0,1.0
-1,1,3,0.9
-1
-1,1.0
-2,1,3,0.9
-1
-2,1.0
-3,1,3,0.9
-1
-3,1.0
-4,1,3,0.9
-1
-4,1.0
-5,1,3,0.9
-1
-5,1.0
-6,1,3,0.9
-1
-6,1.0
-7,1,3,0.9
-1
-7,1.0
-0,1,4,0.1
-1
-0,1.0
-1,1,4,0.1
-1
-1,1.0
-2,1,4,0.1
-4
-2,0.7924058
-3,0.35218036
-4,0.35218036
-5,0.35218036
-3,1,4,0.1
-4
-3,0.79240584
-2,0.3521804
-5,0.3521804
-6,0.3521804
-4,1,4,0.1
-4
-4,0.7088104
-5,0.44628802
-6,0.44628802
-2,0.31502685
-5,1,4,0.1
-4
-5,0.7088104
-4,0.44628802
-7,0.44628802
-2,0.31502685
-6,1,4,0.1
-4
-6,0.7088104
-4,0.44628802
-7,0.44628802
-2,0.31502685
-7,1,4,0.1
-4
-7,0.7088104
-5,0.44628802
-6,0.44628802
-3,0.31502685
-0,1,4,0.3
-1
-0,1.0
-1,1,4,0.3
-1
-1,1.0
-2,1,4,0.3
-4
-2,0.8962582
-3,0.25607374
-4,0.25607374
-5,0.25607374
-3,1,4,0.3
-4
-3,0.8962582
-2,0.25607374
-5,0.25607374
-6,0.25607374
-4,1,4,0.3
-4
-4,0.7831679
-5,0.41023073
-6,0.41023073
-2,0.22376224
-5,1,4,0.3
-4
-5,0.7831679
-4,0.41023073
-7,0.41023073
-2,0.22376224
-6,1,4,0.3
-4
-6,0.7831679
-4,0.41023073
-7,0.41023073
-2,0.22376224
-7,1,4,0.3
-4
-7,0.7831679
-5,0.41023073
-6,0.41023073
-3,0.22376224
-0,1,4,0.5
-1
-0,1.0
-1,1,4,0.5
-1
-1,1.0
-2,1,4,0.5
-1
-2,1.0
-3,1,4,0.5
-1
-3,1.0
-4,1,4,0.5
-3
-4,0.9045341
-5,0.3015113
-6,0.3015113
-5,1,4,0.5
-3
-5,0.9045341
-4,0.3015113
-7,0.3015113
-6,1,4,0.5
-3
-6,0.9045341
-4,0.3015113
-7,0.3015113
-7,1,4,0.5
-3
-7,0.9045341
-5,0.3015113
-6,0.3015113
-0,1,4,0.7
-1
-0,1.0
-1,1,4,0.7
-1
-1,1.0
-2,1,4,0.7
-1
-2,1.0
-3,1,4,0.7
-1
-3,1.0
-4,1,4,0.7
-1
-4,1.0
-5,1,4,0.7
-1
-5,1.0
-6,1,4,0.7
-1
-6,1.0
-7,1,4,0.7
-1
-7,1.0
-0,1,4,0.9
-1
-0,1.0
-1,1,4,0.9
-1
-1,1.0
-2,1,4,0.9
-1
-2,1.0
-3,1,4,0.9
-1
-3,1.0
-4,1,4,0.9
-1
-4,1.0
-5,1,4,0.9
-1
-5,1.0
-6,1,4,0.9
-1
-6,1.0
-7,1,4,0.9
-1
-7,1.0
-0,1,5,0.1
-1
-0,1.0
-1,1,5,0.1
-1
-1,1.0
-2,1,5,0.1
-5
-2,0.7474093
-3,0.33218193
-4,0.33218193
-5,0.33218193
-6,0.33218193
-3,1,5,0.1
-5
-3,0.74740934
-2,0.33218196
-5,0.33218196
-6,0.33218196
-7,0.33218196
-4,1,5,0.1
-5
-4,0.697137
-5,0.4389381
-6,0.4389381
-2,0.30983868
-7,0.18073922
-5,1,5,0.1
-5
-5,0.67605716
-4,0.42566562
-7,0.42566562
-2,0.30046988
-3,0.30046988
-6,1,5,0.1
-5
-6,0.67605716
-4,0.42566562
-7,0.42566562
-2,0.30046988
-3,0.30046988
-7,1,5,0.1
-5
-7,0.697137
-5,0.4389381
-6,0.4389381
-3,0.30983868
-4,0.18073922
-0,1,5,0.3
-1
-0,1.0
-1,1,5,0.3
-1
-1,1.0
-2,1,5,0.3
-5
-2,0.86824316
-3,0.24806947
-4,0.24806947
-5,0.24806947
-6,0.24806947
-3,1,5,0.3
-5
-3,0.8682432
-2,0.24806948
-5,0.24806948
-6,0.24806948
-7,0.24806948
-4,1,5,0.3
-5
-4,0.7826238
-5,0.40994576
-6,0.40994576
-2,0.2236068
-7,0.037267767
-5,1,5,0.3
-5
-5,0.7642683
-4,0.40033093
-7,0.40033093
-2,0.21836235
-3,0.21836235
-6,1,5,0.3
-5
-6,0.7642683
-4,0.40033093
-7,0.40033093
-2,0.21836235
-3,0.21836235
-7,1,5,0.3
-5
-7,0.7826238
-5,0.40994576
-6,0.40994576
-3,0.2236068
-4,0.037267767
-0,1,5,0.5
-1
-0,1.0
-1,1,5,0.5
-1
-1,1.0
-2,1,5,0.5
-1
-2,1.0
-3,1,5,0.5
-1
-3,1.0
-4,1,5,0.5
-3
-4,0.9045341
-5,0.3015113
-6,0.3015113
-5,1,5,0.5
-3
-5,0.9045341
-4,0.3015113
-7,0.3015113
-6,1,5,0.5
-3
-6,0.9045341
-4,0.3015113
-7,0.3015113
-7,1,5,0.5
-3
-7,0.9045341
-5,0.3015113
-6,0.3015113
-0,1,5,0.7
-1
-0,1.0
-1,1,5,0.7
-1
-1,1.0
-2,1,5,0.7
-1
-2,1.0
-3,1,5,0.7
-1
-3,1.0
-4,1,5,0.7
-1
-4,1.0
-5,1,5,0.7
-1
-5,1.0
-6,1,5,0.7
-1
-6,1.0
-7,1,5,0.7
-1
-7,1.0
-0,1,5,0.9
-1
-0,1.0
-1,1,5,0.9
-1
-1,1.0
-2,1,5,0.9
-1
-2,1.0
-3,1,5,0.9
-1
-3,1.0
-4,1,5,0.9
-1
-4,1.0
-5,1,5,0.9
-1
-5,1.0
-6,1,5,0.9
-1
-6,1.0
-7,1,5,0.9
-1
-7,1.0
-0,1,6,0.1
-1
-0,1.0
-1,1,6,0.1
-1
-1,1.0
-2,1,6,0.1
-5
-2,0.7474093
-3,0.33218193
-4,0.33218193
-5,0.33218193
-6,0.33218193
-3,1,6,0.1
-5
-3,0.74740934
-2,0.33218196
-5,0.33218196
-6,0.33218196
-7,0.33218196
-4,1,6,0.1
-5
-4,0.697137
-5,0.4389381
-6,0.4389381
-2,0.30983868
-7,0.18073922
-5,1,6,0.1
-6
-5,0.6659059
-4,0.41927406
-7,0.41927406
-2,0.2959582
-3,0.2959582
-6,0.17264226
-6,1,6,0.1
-6
-6,0.6659059
-4,0.41927406
-7,0.41927406
-2,0.2959582
-3,0.2959582
-5,0.17264226
-7,1,6,0.1
-5
-7,0.697137
-5,0.4389381
-6,0.4389381
-3,0.30983868
-4,0.18073922
-0,1,6,0.3
-1
-0,1.0
-1,1,6,0.3
-1
-1,1.0
-2,1,6,0.3
-5
-2,0.86824316
-3,0.24806947
-4,0.24806947
-5,0.24806947
-6,0.24806947
-3,1,6,0.3
-5
-3,0.8682432
-2,0.24806948
-5,0.24806948
-6,0.24806948
-7,0.24806948
-4,1,6,0.3
-5
-4,0.7826238
-5,0.40994576
-6,0.40994576
-2,0.2236068
-7,0.037267767
-5,1,6,0.3
-6
-5,0.76376265
-4,0.40006608
-7,0.40006608
-2,0.2182179
-3,0.2182179
-6,0.036369618
-6,1,6,0.3
-6
-6,0.76376265
-4,0.40006608
-7,0.40006608
-2,0.2182179
-3,0.2182179
-5,0.036369618
-7,1,6,0.3
-5
-7,0.7826238
-5,0.40994576
-6,0.40994576
-3,0.2236068
-4,0.037267767
-0,1,6,0.5
-1
-0,1.0
-1,1,6,0.5
-1
-1,1.0
-2,1,6,0.5
-1
-2,1.0
-3,1,6,0.5
-1
-3,1.0
-4,1,6,0.5
-3
-4,0.9045341
-5,0.3015113
-6,0.3015113
-5,1,6,0.5
-3
-5,0.9045341
-4,0.3015113
-7,0.3015113
-6,1,6,0.5
-3
-6,0.9045341
-4,0.3015113
-7,0.3015113
-7,1,6,0.5
-3
-7,0.9045341
-5,0.3015113
-6,0.3015113
-0,1,6,0.7
-1
-0,1.0
-1,1,6,0.7
-1
-1,1.0
-2,1,6,0.7
-1
-2,1.0
-3,1,6,0.7
-1
-3,1.0
-4,1,6,0.7
-1
-4,1.0
-5,1,6,0.7
-1
-5,1.0
-6,1,6,0.7
-1
-6,1.0
-7,1,6,0.7
-1
-7,1.0
-0,1,6,0.9
-1
-0,1.0
-1,1,6,0.9
-1
-1,1.0
-2,1,6,0.9
-1
-2,1.0
-3,1,6,0.9
-1
-3,1.0
-4,1,6,0.9
-1
-4,1.0
-5,1,6,0.9
-1
-5,1.0
-6,1,6,0.9
-1
-6,1.0
-7,1,6,0.9
-1
-7,1.0
-0,1,7,0.1
-1
-0,1.0
-1,1,7,0.1
-1
-1,1.0
-2,1,7,0.1
-5
-2,0.7474093
-3,0.33218193
-4,0.33218193
-5,0.33218193
-6,0.33218193
-3,1,7,0.1
-5
-3,0.74740934
-2,0.33218196
-5,0.33218196
-6,0.33218196
-7,0.33218196
-4,1,7,0.1
-5
-4,0.697137
-5,0.4389381
-6,0.4389381
-2,0.30983868
-7,0.18073922
-5,1,7,0.1
-6
-5,0.6659059
-4,0.41927406
-7,0.41927406
-2,0.2959582
-3,0.2959582
-6,0.17264226
-6,1,7,0.1
-6
-6,0.6659059
-4,0.41927406
-7,0.41927406
-2,0.2959582
-3,0.2959582
-5,0.17264226
-7,1,7,0.1
-5
-7,0.697137
-5,0.4389381
-6,0.4389381
-3,0.30983868
-4,0.18073922
-0,1,7,0.3
-1
-0,1.0
-1,1,7,0.3
-1
-1,1.0
-2,1,7,0.3
-5
-2,0.86824316
-3,0.24806947
-4,0.24806947
-5,0.24806947
-6,0.24806947
-3,1,7,0.3
-5
-3,0.8682432
-2,0.24806948
-5,0.24806948
-6,0.24806948
-7,0.24806948
-4,1,7,0.3
-5
-4,0.7826238
-5,0.40994576
-6,0.40994576
-2,0.2236068
-7,0.037267767
-5,1,7,0.3
-6
-5,0.76376265
-4,0.40006608
-7,0.40006608
-2,0.2182179
-3,0.2182179
-6,0.036369618
-6,1,7,0.3
-6
-6,0.76376265
-4,0.40006608
-7,0.40006608
-2,0.2182179
-3,0.2182179
-5,0.036369618
-7,1,7,0.3
-5
-7,0.7826238
-5,0.40994576
-6,0.40994576
-3,0.2236068
-4,0.037267767
-0,1,7,0.5
-1
-0,1.0
-1,1,7,0.5
-1
-1,1.0
-2,1,7,0.5
-1
-2,1.0
-3,1,7,0.5
-1
-3,1.0
-4,1,7,0.5
-3
-4,0.9045341
-5,0.3015113
-6,0.3015113
-5,1,7,0.5
-3
-5,0.9045341
-4,0.3015113
-7,0.3015113
-6,1,7,0.5
-3
-6,0.9045341
-4,0.3015113
-7,0.3015113
-7,1,7,0.5
-3
-7,0.9045341
-5,0.3015113
-6,0.3015113
-0,1,7,0.7
-1
-0,1.0
-1,1,7,0.7
-1
-1,1.0
-2,1,7,0.7
-1
-2,1.0
-3,1,7,0.7
-1
-3,1.0
-4,1,7,0.7
-1
-4,1.0
-5,1,7,0.7
-1
-5,1.0
-6,1,7,0.7
-1
-6,1.0
-7,1,7,0.7
-1
-7,1.0
-0,1,7,0.9
-1
-0,1.0
-1,1,7,0.9
-1
-1,1.0
-2,1,7,0.9
-1
-2,1.0
-3,1,7,0.9
-1
-3,1.0
-4,1,7,0.9
-1
-4,1.0
-5,1,7,0.9
-1
-5,1.0
-6,1,7,0.9
-1
-6,1.0
-7,1,7,0.9
-1
-7,1.0
-0,1,8,0.1
-1
-0,1.0
-1,1,8,0.1
-1
-1,1.0
-2,1,8,0.1
-5
-2,0.7474093
-3,0.33218193
-4,0.33218193
-5,0.33218193
-6,0.33218193
-3,1,8,0.1
-5
-3,0.74740934
-2,0.33218196
-5,0.33218196
-6,0.33218196
-7,0.33218196
-4,1,8,0.1
-5
-4,0.697137
-5,0.4389381
-6,0.4389381
-2,0.30983868
-7,0.18073922
-5,1,8,0.1
-6
-5,0.6659059
-4,0.41927406
-7,0.41927406
-2,0.2959582
-3,0.2959582
-6,0.17264226
-6,1,8,0.1
-6
-6,0.6659059
-4,0.41927406
-7,0.41927406
-2,0.2959582
-3,0.2959582
-5,0.17264226
-7,1,8,0.1
-5
-7,0.697137
-5,0.4389381
-6,0.4389381
-3,0.30983868
-4,0.18073922
-0,1,8,0.3
-1
-0,1.0
-1,1,8,0.3
-1
-1,1.0
-2,1,8,0.3
-5
-2,0.86824316
-3,0.24806947
-4,0.24806947
-5,0.24806947
-6,0.24806947
-3,1,8,0.3
-5
-3,0.8682432
-2,0.24806948
-5,0.24806948
-6,0.24806948
-7,0.24806948
-4,1,8,0.3
-5
-4,0.7826238
-5,0.40994576
-6,0.40994576
-2,0.2236068
-7,0.037267767
-5,1,8,0.3
-6
-5,0.76376265
-4,0.40006608
-7,0.40006608
-2,0.2182179
-3,0.2182179
-6,0.036369618
-6,1,8,0.3
-6
-6,0.76376265
-4,0.40006608
-7,0.40006608
-2,0.2182179
-3,0.2182179
-5,0.036369618
-7,1,8,0.3
-5
-7,0.7826238
-5,0.40994576
-6,0.40994576
-3,0.2236068
-4,0.037267767
-0,1,8,0.5
-1
-0,1.0
-1,1,8,0.5
-1
-1,1.0
-2,1,8,0.5
-1
-2,1.0
-3,1,8,0.5
-1
-3,1.0
-4,1,8,0.5
-3
-4,0.9045341
-5,0.3015113
-6,0.3015113
-5,1,8,0.5
-3
-5,0.9045341
-4,0.3015113
-7,0.3015113
-6,1,8,0.5
-3
-6,0.9045341
-4,0.3015113
-7,0.3015113
-7,1,8,0.5
-3
-7,0.9045341
-5,0.3015113
-6,0.3015113
-0,1,8,0.7
-1
-0,1.0
-1,1,8,0.7
-1
-1,1.0
-2,1,8,0.7
-1
-2,1.0
-3,1,8,0.7
-1
-3,1.0
-4,1,8,0.7
-1
-4,1.0
-5,1,8,0.7
-1
-5,1.0
-6,1,8,0.7
-1
-6,1.0
-7,1,8,0.7
-1
-7,1.0
-0,1,8,0.9
-1
-0,1.0
-1,1,8,0.9
-1
-1,1.0
-2,1,8,0.9
-1
-2,1.0
-3,1,8,0.9
-1
-3,1.0
-4,1,8,0.9
-1
-4,1.0
-5,1,8,0.9
-1
-5,1.0
-6,1,8,0.9
-1
-6,1.0
-7,1,8,0.9
-1
-7,1.0
-0,2,1,0.1
-1
-0,1.0
-1,2,1,0.1
-1
-1,1.0
-2,2,1,0.1
-1
-2,1.0
-3,2,1,0.1
-1
-3,1.0
-4,2,1,0.1
-1
-4,1.0
-5,2,1,0.1
-1
-5,1.0
-6,2,1,0.1
-1
-6,1.0
-7,2,1,0.1
-1
-7,1.0
-0,2,1,0.3
-1
-0,1.0
-1,2,1,0.3
-1
-1,1.0
-2,2,1,0.3
-1
-2,1.0
-3,2,1,0.3
-1
-3,1.0
-4,2,1,0.3
-1
-4,1.0
-5,2,1,0.3
-1
-5,1.0
-6,2,1,0.3
-1
-6,1.0
-7,2,1,0.3
-1
-7,1.0
-0,2,1,0.5
-1
-0,1.0
-1,2,1,0.5
-1
-1,1.0
-2,2,1,0.5
-1
-2,1.0
-3,2,1,0.5
-1
-3,1.0
-4,2,1,0.5
-1
-4,1.0
-5,2,1,0.5
-1
-5,1.0
-6,2,1,0.5
-1
-6,1.0
-7,2,1,0.5
-1
-7,1.0
-0,2,1,0.7
-1
-0,1.0
-1,2,1,0.7
-1
-1,1.0
-2,2,1,0.7
-1
-2,1.0
-3,2,1,0.7
-1
-3,1.0
-4,2,1,0.7
-1
-4,1.0
-5,2,1,0.7
-1
-5,1.0
-6,2,1,0.7
-1
-6,1.0
-7,2,1,0.7
-1
-7,1.0
-0,2,1,0.9
-1
-0,1.0
-1,2,1,0.9
-1
-1,1.0
-2,2,1,0.9
-1
-2,1.0
-3,2,1,0.9
-1
-3,1.0
-4,2,1,0.9
-1
-4,1.0
-5,2,1,0.9
-1
-5,1.0
-6,2,1,0.9
-1
-6,1.0
-7,2,1,0.9
-1
-7,1.0
-0,2,2,0.1
-1
-0,1.0
-1,2,2,0.1
-1
-1,1.0
-2,2,2,0.1
-2
-2,0.91381156
-4,0.4061385
-3,2,2,0.1
-2
-3,0.91381156
-6,0.4061385
-4,2,2,0.1
-2
-4,0.84623283
-5,0.53281325
-5,2,2,0.1
-2
-5,0.84623283
-4,0.53281325
-6,2,2,0.1
-2
-6,0.84623283
-7,0.53281325
-7,2,2,0.1
-2
-7,0.84623283
-6,0.53281325
-0,2,2,0.3
-1
-0,1.0
-1,2,2,0.3
-1
-1,1.0
-2,2,2,0.3
-2
-2,0.96152395
-4,0.27472112
-3,2,2,0.3
-2
-3,0.96152395
-6,0.27472112
-4,2,2,0.3
-2
-4,0.88583153
-5,0.4640069
-5,2,2,0.3
-2
-5,0.88583153
-4,0.4640069
-6,2,2,0.3
-2
-6,0.88583153
-7,0.4640069
-7,2,2,0.3
-2
-7,0.88583153
-6,0.4640069
-0,2,2,0.5
-1
-0,1.0
-1,2,2,0.5
-1
-1,1.0
-2,2,2,0.5
-1
-2,1.0
-3,2,2,0.5
-1
-3,1.0
-4,2,2,0.5
-2
-4,0.9486833
-5,0.3162277
-5,2,2,0.5
-2
-5,0.9486833
-4,0.3162277
-6,2,2,0.5
-2
-6,0.9486833
-7,0.3162277
-7,2,2,0.5
-2
-7,0.9486833
-6,0.3162277
-0,2,2,0.7
-1
-0,1.0
-1,2,2,0.7
-1
-1,1.0
-2,2,2,0.7
-1
-2,1.0
-3,2,2,0.7
-1
-3,1.0
-4,2,2,0.7
-1
-4,1.0
-5,2,2,0.7
-1
-5,1.0
-6,2,2,0.7
-1
-6,1.0
-7,2,2,0.7
-1
-7,1.0
-0,2,2,0.9
-1
-0,1.0
-1,2,2,0.9
-1
-1,1.0
-2,2,2,0.9
-1
-2,1.0
-3,2,2,0.9
-1
-3,1.0
-4,2,2,0.9
-1
-4,1.0
-5,2,2,0.9
-1
-5,1.0
-6,2,2,0.9
-1
-6,1.0
-7,2,2,0.9
-1
-7,1.0
-0,2,3,0.1
-1
-0,1.0
-1,2,3,0.1
-1
-1,1.0
-2,2,3,0.1
-3
-2,0.84664875
-4,0.37628835
-5,0.37628835
-3,2,3,0.1
-3
-3,0.84664875
-6,0.37628835
-7,0.37628835
-4,2,3,0.1
-3
-4,0.7920648
-5,0.49870744
-2,0.35202882
-5,2,3,0.1
-3
-5,0.7920648
-4,0.49870744
-2,0.35202882
-6,2,3,0.1
-3
-6,0.7920648
-7,0.49870744
-3,0.35202882
-7,2,3,0.1
-3
-7,0.7920648
-6,0.49870744
-3,0.35202882
-0,2,3,0.3
-1
-0,1.0
-1,2,3,0.3
-1
-1,1.0
-2,2,3,0.3
-3
-2,0.92717266
-4,0.26490647
-5,0.26490647
-3,2,3,0.3
-3
-3,0.92717266
-6,0.26490647
-7,0.26490647
-4,2,3,0.3
-3
-4,0.85875386
-5,0.44982338
-2,0.24535823
-5,2,3,0.3
-3
-5,0.85875386
-4,0.44982338
-2,0.24535823
-6,2,3,0.3
-3
-6,0.85875386
-7,0.44982338
-3,0.24535823
-7,2,3,0.3
-3
-7,0.85875386
-6,0.44982338
-3,0.24535823
-0,2,3,0.5
-1
-0,1.0
-1,2,3,0.5
-1
-1,1.0
-2,2,3,0.5
-1
-2,1.0
-3,2,3,0.5
-1
-3,1.0
-4,2,3,0.5
-2
-4,0.9486833
-5,0.3162277
-5,2,3,0.5
-2
-5,0.9486833
-4,0.3162277
-6,2,3,0.5
-2
-6,0.9486833
-7,0.3162277
-7,2,3,0.5
-2
-7,0.9486833
-6,0.3162277
-0,2,3,0.7
-1
-0,1.0
-1,2,3,0.7
-1
-1,1.0
-2,2,3,0.7
-1
-2,1.0
-3,2,3,0.7
-1
-3,1.0
-4,2,3,0.7
-1
-4,1.0
-5,2,3,0.7
-1
-5,1.0
-6,2,3,0.7
-1
-6,1.0
-7,2,3,0.7
-1
-7,1.0
-0,2,3,0.9
-1
-0,1.0
-1,2,3,0.9
-1
-1,1.0
-2,2,3,0.9
-1
-2,1.0
-3,2,3,0.9
-1
-3,1.0
-4,2,3,0.9
-1
-4,1.0
-5,2,3,0.9
-1
-5,1.0
-6,2,3,0.9
-1
-6,1.0
-7,2,3,0.9
-1
-7,1.0
-0,2,4,0.1
-1
-0,1.0
-1,2,4,0.1
-1
-1,1.0
-2,2,4,0.1
-3
-2,0.84664875
-4,0.37628835
-5,0.37628835
-3,2,4,0.1
-3
-3,0.84664875
-6,0.37628835
-7,0.37628835
-4,2,4,0.1
-3
-4,0.7920648
-5,0.49870744
-2,0.35202882
-5,2,4,0.1
-3
-5,0.7920648
-4,0.49870744
-2,0.35202882
-6,2,4,0.1
-3
-6,0.7920648
-7,0.49870744
-3,0.35202882
-7,2,4,0.1
-3
-7,0.7920648
-6,0.49870744
-3,0.35202882
-0,2,4,0.3
-1
-0,1.0
-1,2,4,0.3
-1
-1,1.0
-2,2,4,0.3
-3
-2,0.92717266
-4,0.26490647
-5,0.26490647
-3,2,4,0.3
-3
-3,0.92717266
-6,0.26490647
-7,0.26490647
-4,2,4,0.3
-3
-4,0.85875386
-5,0.44982338
-2,0.24535823
-5,2,4,0.3
-3
-5,0.85875386
-4,0.44982338
-2,0.24535823
-6,2,4,0.3
-3
-6,0.85875386
-7,0.44982338
-3,0.24535823
-7,2,4,0.3
-3
-7,0.85875386
-6,0.44982338
-3,0.24535823
-0,2,4,0.5
-1
-0,1.0
-1,2,4,0.5
-1
-1,1.0
-2,2,4,0.5
-1
-2,1.0
-3,2,4,0.5
-1
-3,1.0
-4,2,4,0.5
-2
-4,0.9486833
-5,0.3162277
-5,2,4,0.5
-2
-5,0.9486833
-4,0.3162277
-6,2,4,0.5
-2
-6,0.9486833
-7,0.3162277
-7,2,4,0.5
-2
-7,0.9486833
-6,0.3162277
-0,2,4,0.7
-1
-0,1.0
-1,2,4,0.7
-1
-1,1.0
-2,2,4,0.7
-1
-2,1.0
-3,2,4,0.7
-1
-3,1.0
-4,2,4,0.7
-1
-4,1.0
-5,2,4,0.7
-1
-5,1.0
-6,2,4,0.7
-1
-6,1.0
-7,2,4,0.7
-1
-7,1.0
-0,2,4,0.9
-1
-0,1.0
-1,2,4,0.9
-1
-1,1.0
-2,2,4,0.9
-1
-2,1.0
-3,2,4,0.9
-1
-3,1.0
-4,2,4,0.9
-1
-4,1.0
-5,2,4,0.9
-1
-5,1.0
-6,2,4,0.9
-1
-6,1.0
-7,2,4,0.9
-1
-7,1.0
-0,2,5,0.1
-1
-0,1.0
-1,2,5,0.1
-1
-1,1.0
-2,2,5,0.1
-3
-2,0.84664875
-4,0.37628835
-5,0.37628835
-3,2,5,0.1
-3
-3,0.84664875
-6,0.37628835
-7,0.37628835
-4,2,5,0.1
-3
-4,0.7920648
-5,0.49870744
-2,0.35202882
-5,2,5,0.1
-3
-5,0.7920648
-4,0.49870744
-2,0.35202882
-6,2,5,0.1
-3
-6,0.7920648
-7,0.49870744
-3,0.35202882
-7,2,5,0.1
-3
-7,0.7920648
-6,0.49870744
-3,0.35202882
-0,2,5,0.3
-1
-0,1.0
-1,2,5,0.3
-1
-1,1.0
-2,2,5,0.3
-3
-2,0.92717266
-4,0.26490647
-5,0.26490647
-3,2,5,0.3
-3
-3,0.92717266
-6,0.26490647
-7,0.26490647
-4,2,5,0.3
-3
-4,0.85875386
-5,0.44982338
-2,0.24535823
-5,2,5,0.3
-3
-5,0.85875386
-4,0.44982338
-2,0.24535823
-6,2,5,0.3
-3
-6,0.85875386
-7,0.44982338
-3,0.24535823
-7,2,5,0.3
-3
-7,0.85875386
-6,0.44982338
-3,0.24535823
-0,2,5,0.5
-1
-0,1.0
-1,2,5,0.5
-1
-1,1.0
-2,2,5,0.5
-1
-2,1.0
-3,2,5,0.5
-1
-3,1.0
-4,2,5,0.5
-2
-4,0.9486833
-5,0.3162277
-5,2,5,0.5
-2
-5,0.9486833
-4,0.3162277
-6,2,5,0.5
-2
-6,0.9486833
-7,0.3162277
-7,2,5,0.5
-2
-7,0.9486833
-6,0.3162277
-0,2,5,0.7
-1
-0,1.0
-1,2,5,0.7
-1
-1,1.0
-2,2,5,0.7
-1
-2,1.0
-3,2,5,0.7
-1
-3,1.0
-4,2,5,0.7
-1
-4,1.0
-5,2,5,0.7
-1
-5,1.0
-6,2,5,0.7
-1
-6,1.0
-7,2,5,0.7
-1
-7,1.0
-0,2,5,0.9
-1
-0,1.0
-1,2,5,0.9
-1
-1,1.0
-2,2,5,0.9
-1
-2,1.0
-3,2,5,0.9
-1
-3,1.0
-4,2,5,0.9
-1
-4,1.0
-5,2,5,0.9
-1
-5,1.0
-6,2,5,0.9
-1
-6,1.0
-7,2,5,0.9
-1
-7,1.0
-0,2,6,0.1
-1
-0,1.0
-1,2,6,0.1
-1
-1,1.0
-2,2,6,0.1
-3
-2,0.84664875
-4,0.37628835
-5,0.37628835
-3,2,6,0.1
-3
-3,0.84664875
-6,0.37628835
-7,0.37628835
-4,2,6,0.1
-3
-4,0.7920648
-5,0.49870744
-2,0.35202882
-5,2,6,0.1
-3
-5,0.7920648
-4,0.49870744
-2,0.35202882
-6,2,6,0.1
-3
-6,0.7920648
-7,0.49870744
-3,0.35202882
-7,2,6,0.1
-3
-7,0.7920648
-6,0.49870744
-3,0.35202882
-0,2,6,0.3
-1
-0,1.0
-1,2,6,0.3
-1
-1,1.0
-2,2,6,0.3
-3
-2,0.92717266
-4,0.26490647
-5,0.26490647
-3,2,6,0.3
-3
-3,0.92717266
-6,0.26490647
-7,0.26490647
-4,2,6,0.3
-3
-4,0.85875386
-5,0.44982338
-2,0.24535823
-5,2,6,0.3
-3
-5,0.85875386
-4,0.44982338
-2,0.24535823
-6,2,6,0.3
-3
-6,0.85875386
-7,0.44982338
-3,0.24535823
-7,2,6,0.3
-3
-7,0.85875386
-6,0.44982338
-3,0.24535823
-0,2,6,0.5
-1
-0,1.0
-1,2,6,0.5
-1
-1,1.0
-2,2,6,0.5
-1
-2,1.0
-3,2,6,0.5
-1
-3,1.0
-4,2,6,0.5
-2
-4,0.9486833
-5,0.3162277
-5,2,6,0.5
-2
-5,0.9486833
-4,0.3162277
-6,2,6,0.5
-2
-6,0.9486833
-7,0.3162277
-7,2,6,0.5
-2
-7,0.9486833
-6,0.3162277
-0,2,6,0.7
-1
-0,1.0
-1,2,6,0.7
-1
-1,1.0
-2,2,6,0.7
-1
-2,1.0
-3,2,6,0.7
-1
-3,1.0
-4,2,6,0.7
-1
-4,1.0
-5,2,6,0.7
-1
-5,1.0
-6,2,6,0.7
-1
-6,1.0
-7,2,6,0.7
-1
-7,1.0
-0,2,6,0.9
-1
-0,1.0
-1,2,6,0.9
-1
-1,1.0
-2,2,6,0.9
-1
-2,1.0
-3,2,6,0.9
-1
-3,1.0
-4,2,6,0.9
-1
-4,1.0
-5,2,6,0.9
-1
-5,1.0
-6,2,6,0.9
-1
-6,1.0
-7,2,6,0.9
-1
-7,1.0
-0,2,7,0.1
-1
-0,1.0
-1,2,7,0.1
-1
-1,1.0
-2,2,7,0.1
-3
-2,0.84664875
-4,0.37628835
-5,0.37628835
-3,2,7,0.1
-3
-3,0.84664875
-6,0.37628835
-7,0.37628835
-4,2,7,0.1
-3
-4,0.7920648
-5,0.49870744
-2,0.35202882
-5,2,7,0.1
-3
-5,0.7920648
-4,0.49870744
-2,0.35202882
-6,2,7,0.1
-3
-6,0.7920648
-7,0.49870744
-3,0.35202882
-7,2,7,0.1
-3
-7,0.7920648
-6,0.49870744
-3,0.35202882
-0,2,7,0.3
-1
-0,1.0
-1,2,7,0.3
-1
-1,1.0
-2,2,7,0.3
-3
-2,0.92717266
-4,0.26490647
-5,0.26490647
-3,2,7,0.3
-3
-3,0.92717266
-6,0.26490647
-7,0.26490647
-4,2,7,0.3
-3
-4,0.85875386
-5,0.44982338
-2,0.24535823
-5,2,7,0.3
-3
-5,0.85875386
-4,0.44982338
-2,0.24535823
-6,2,7,0.3
-3
-6,0.85875386
-7,0.44982338
-3,0.24535823
-7,2,7,0.3
-3
-7,0.85875386
-6,0.44982338
-3,0.24535823
-0,2,7,0.5
-1
-0,1.0
-1,2,7,0.5
-1
-1,1.0
-2,2,7,0.5
-1
-2,1.0
-3,2,7,0.5
-1
-3,1.0
-4,2,7,0.5
-2
-4,0.9486833
-5,0.3162277
-5,2,7,0.5
-2
-5,0.9486833
-4,0.3162277
-6,2,7,0.5
-2
-6,0.9486833
-7,0.3162277
-7,2,7,0.5
-2
-7,0.9486833
-6,0.3162277
-0,2,7,0.7
-1
-0,1.0
-1,2,7,0.7
-1
-1,1.0
-2,2,7,0.7
-1
-2,1.0
-3,2,7,0.7
-1
-3,1.0
-4,2,7,0.7
-1
-4,1.0
-5,2,7,0.7
-1
-5,1.0
-6,2,7,0.7
-1
-6,1.0
-7,2,7,0.7
-1
-7,1.0
-0,2,7,0.9
-1
-0,1.0
-1,2,7,0.9
-1
-1,1.0
-2,2,7,0.9
-1
-2,1.0
-3,2,7,0.9
-1
-3,1.0
-4,2,7,0.9
-1
-4,1.0
-5,2,7,0.9
-1
-5,1.0
-6,2,7,0.9
-1
-6,1.0
-7,2,7,0.9
-1
-7,1.0
-0,2,8,0.1
-1
-0,1.0
-1,2,8,0.1
-1
-1,1.0
-2,2,8,0.1
-3
-2,0.84664875
-4,0.37628835
-5,0.37628835
-3,2,8,0.1
-3
-3,0.84664875
-6,0.37628835
-7,0.37628835
-4,2,8,0.1
-3
-4,0.7920648
-5,0.49870744
-2,0.35202882
-5,2,8,0.1
-3
-5,0.7920648
-4,0.49870744
-2,0.35202882
-6,2,8,0.1
-3
-6,0.7920648
-7,0.49870744
-3,0.35202882
-7,2,8,0.1
-3
-7,0.7920648
-6,0.49870744
-3,0.35202882
-0,2,8,0.3
-1
-0,1.0
-1,2,8,0.3
-1
-1,1.0
-2,2,8,0.3
-3
-2,0.92717266
-4,0.26490647
-5,0.26490647
-3,2,8,0.3
-3
-3,0.92717266
-6,0.26490647
-7,0.26490647
-4,2,8,0.3
-3
-4,0.85875386
-5,0.44982338
-2,0.24535823
-5,2,8,0.3
-3
-5,0.85875386
-4,0.44982338
-2,0.24535823
-6,2,8,0.3
-3
-6,0.85875386
-7,0.44982338
-3,0.24535823
-7,2,8,0.3
-3
-7,0.85875386
-6,0.44982338
-3,0.24535823
-0,2,8,0.5
-1
-0,1.0
-1,2,8,0.5
-1
-1,1.0
-2,2,8,0.5
-1
-2,1.0
-3,2,8,0.5
-1
-3,1.0
-4,2,8,0.5
-2
-4,0.9486833
-5,0.3162277
-5,2,8,0.5
-2
-5,0.9486833
-4,0.3162277
-6,2,8,0.5
-2
-6,0.9486833
-7,0.3162277
-7,2,8,0.5
-2
-7,0.9486833
-6,0.3162277
-0,2,8,0.7
-1
-0,1.0
-1,2,8,0.7
-1
-1,1.0
-2,2,8,0.7
-1
-2,1.0
-3,2,8,0.7
-1
-3,1.0
-4,2,8,0.7
-1
-4,1.0
-5,2,8,0.7
-1
-5,1.0
-6,2,8,0.7
-1
-6,1.0
-7,2,8,0.7
-1
-7,1.0
-0,2,8,0.9
-1
-0,1.0
-1,2,8,0.9
-1
-1,1.0
-2,2,8,0.9
-1
-2,1.0
-3,2,8,0.9
-1
-3,1.0
-4,2,8,0.9
-1
-4,1.0
-5,2,8,0.9
-1
-5,1.0
-6,2,8,0.9
-1
-6,1.0
-7,2,8,0.9
-1
-7,1.0

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/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 1cc86ba..2467e99 100644
--- a/lucene/sandbox/src/test/org/apache/lucene/search/TestTermAutomatonQuery.java
+++ b/lucene/sandbox/src/test/org/apache/lucene/search/TestTermAutomatonQuery.java
@@ -633,8 +633,8 @@ public class TestTermAutomatonQuery extends LuceneTestCase {
     }
 
     @Override
-    public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-      return new ConstantScoreWeight(this) {
+    public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+      return new ConstantScoreWeight(this, boost) {
         @Override
         public Scorer scorer(LeafReaderContext context) throws IOException {
           int maxDoc = context.reader().maxDoc();

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/spatial-extras/src/java/org/apache/lucene/spatial/composite/CompositeVerifyQuery.java
----------------------------------------------------------------------
diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/composite/CompositeVerifyQuery.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/composite/CompositeVerifyQuery.java
index 823b9c2..d556efa 100644
--- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/composite/CompositeVerifyQuery.java
+++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/composite/CompositeVerifyQuery.java
@@ -82,11 +82,11 @@ public class CompositeVerifyQuery extends Query {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    final Weight indexQueryWeight = indexQuery.createWeight(searcher, false);//scores aren't unsupported
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    final Weight indexQueryWeight = indexQuery.createWeight(searcher, false, boost);//scores aren't unsupported
     final Map valueSourceContext = ValueSource.newContext(searcher);
 
-    return new ConstantScoreWeight(this) {
+    return new ConstantScoreWeight(this, boost) {
 
       @Override
       public Scorer scorer(LeafReaderContext context) throws IOException {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/spatial-extras/src/java/org/apache/lucene/spatial/composite/IntersectsRPTVerifyQuery.java
----------------------------------------------------------------------
diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/composite/IntersectsRPTVerifyQuery.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/composite/IntersectsRPTVerifyQuery.java
index ad91514..ce8c207 100644
--- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/composite/IntersectsRPTVerifyQuery.java
+++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/composite/IntersectsRPTVerifyQuery.java
@@ -82,10 +82,10 @@ public class IntersectsRPTVerifyQuery extends Query {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
     final Map valueSourceContext = ValueSource.newContext(searcher);
 
-    return new ConstantScoreWeight(this) {
+    return new ConstantScoreWeight(this, boost) {
       @Override
       public Scorer scorer(LeafReaderContext context) throws IOException {
         // Compute approx & exact

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/AbstractPrefixTreeQuery.java
----------------------------------------------------------------------
diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/AbstractPrefixTreeQuery.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/AbstractPrefixTreeQuery.java
index a3f2f14..dbe643e 100644
--- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/AbstractPrefixTreeQuery.java
+++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/AbstractPrefixTreeQuery.java
@@ -76,8 +76,8 @@ public abstract class AbstractPrefixTreeQuery extends Query {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    return new ConstantScoreWeight(this) {
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    return new ConstantScoreWeight(this, boost) {
       @Override
       public Scorer scorer(LeafReaderContext context) throws IOException {
         DocIdSet docSet = getDocIdSet(context);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/spatial-extras/src/java/org/apache/lucene/spatial/serialized/SerializedDVStrategy.java
----------------------------------------------------------------------
diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/serialized/SerializedDVStrategy.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/serialized/SerializedDVStrategy.java
index 7e37aac..c2093f2 100644
--- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/serialized/SerializedDVStrategy.java
+++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/serialized/SerializedDVStrategy.java
@@ -135,8 +135,8 @@ public class SerializedDVStrategy extends SpatialStrategy {
     }
 
     @Override
-    public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-      return new RandomAccessWeight(this) {
+    public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+      return new RandomAccessWeight(this, boost) {
         @Override
         protected Bits getMatchingDocs(LeafReaderContext context) throws IOException {
           final FunctionValues predFuncValues = predicateValueSource.getValues(null, context);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/spatial/src/java/org/apache/lucene/spatial/geopoint/search/GeoPointTermQueryConstantScoreWrapper.java
----------------------------------------------------------------------
diff --git a/lucene/spatial/src/java/org/apache/lucene/spatial/geopoint/search/GeoPointTermQueryConstantScoreWrapper.java b/lucene/spatial/src/java/org/apache/lucene/spatial/geopoint/search/GeoPointTermQueryConstantScoreWrapper.java
index 739dec6..99a1f94 100644
--- a/lucene/spatial/src/java/org/apache/lucene/spatial/geopoint/search/GeoPointTermQueryConstantScoreWrapper.java
+++ b/lucene/spatial/src/java/org/apache/lucene/spatial/geopoint/search/GeoPointTermQueryConstantScoreWrapper.java
@@ -75,8 +75,8 @@ final class GeoPointTermQueryConstantScoreWrapper <Q extends GeoPointMultiTermQu
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    return new ConstantScoreWeight(this) {
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    return new ConstantScoreWeight(this, boost) {
 
       @Override
       public Scorer scorer(LeafReaderContext context) throws IOException {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/PointInGeo3DShapeQuery.java
----------------------------------------------------------------------
diff --git a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/PointInGeo3DShapeQuery.java b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/PointInGeo3DShapeQuery.java
index 34e4de9..105e5d8 100644
--- a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/PointInGeo3DShapeQuery.java
+++ b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/PointInGeo3DShapeQuery.java
@@ -60,12 +60,12 @@ final class PointInGeo3DShapeQuery extends Query {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
 
     // I don't use RandomAccessWeight here: it's no good to approximate with "match all docs"; this is an inverted structure and should be
     // used in the first pass:
 
-    return new ConstantScoreWeight(this) {
+    return new ConstantScoreWeight(this, boost) {
 
       @Override
       public Scorer scorer(LeafReaderContext context) throws IOException {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/CompletionWeight.java
----------------------------------------------------------------------
diff --git a/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/CompletionWeight.java b/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/CompletionWeight.java
index be18ea2..d74e56f 100644
--- a/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/CompletionWeight.java
+++ b/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/CompletionWeight.java
@@ -143,12 +143,4 @@ public class CompletionWeight extends Weight {
     return null;
   }
 
-  @Override
-  public float getValueForNormalization() throws IOException {
-    return 0;
-  }
-
-  @Override
-  public void normalize(float norm, float boost) {
-  }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/ContextQuery.java
----------------------------------------------------------------------
diff --git a/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/ContextQuery.java b/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/ContextQuery.java
index be9f208..7a5e3e0 100644
--- a/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/ContextQuery.java
+++ b/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/ContextQuery.java
@@ -164,8 +164,8 @@ public class ContextQuery extends CompletionQuery {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    final CompletionWeight innerWeight = ((CompletionWeight) innerQuery.createWeight(searcher, needsScores));
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    final CompletionWeight innerWeight = ((CompletionWeight) innerQuery.createWeight(searcher, needsScores, boost));
     // if separators are preserved the fst contains a SEP_LABEL
     // behind each gap. To have a matching automaton, we need to
     // include the SEP_LABEL in the query as well

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/FuzzyCompletionQuery.java
----------------------------------------------------------------------
diff --git a/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/FuzzyCompletionQuery.java b/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/FuzzyCompletionQuery.java
index 5945833..be3aa95 100644
--- a/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/FuzzyCompletionQuery.java
+++ b/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/FuzzyCompletionQuery.java
@@ -142,7 +142,7 @@ public class FuzzyCompletionQuery extends PrefixCompletionQuery {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
     CompletionTokenStream stream = (CompletionTokenStream) analyzer.tokenStream(getField(), getTerm().text());
     Set<IntsRef> refs = new HashSet<>();
     Automaton automaton = toLevenshteinAutomata(stream.toAutomaton(unicodeAware), refs);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/PrefixCompletionQuery.java
----------------------------------------------------------------------
diff --git a/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/PrefixCompletionQuery.java b/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/PrefixCompletionQuery.java
index 91d494b..dbc9298 100644
--- a/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/PrefixCompletionQuery.java
+++ b/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/PrefixCompletionQuery.java
@@ -66,7 +66,7 @@ public class PrefixCompletionQuery extends CompletionQuery {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
     CompletionTokenStream stream = (CompletionTokenStream) analyzer.tokenStream(getField(), getTerm().text());
     return new CompletionWeight(this, stream.toAutomaton());
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/RegexCompletionQuery.java
----------------------------------------------------------------------
diff --git a/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/RegexCompletionQuery.java b/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/RegexCompletionQuery.java
index 5e0c489..71b4b67 100644
--- a/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/RegexCompletionQuery.java
+++ b/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/RegexCompletionQuery.java
@@ -88,7 +88,7 @@ public class RegexCompletionQuery extends CompletionQuery {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
     return new CompletionWeight(this, new RegExp(getTerm().text(), flags).toAutomaton(maxDeterminizedStates));
   }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/SuggestIndexSearcher.java
----------------------------------------------------------------------
diff --git a/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/SuggestIndexSearcher.java b/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/SuggestIndexSearcher.java
index 3407633..a64afed 100644
--- a/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/SuggestIndexSearcher.java
+++ b/lucene/suggest/src/java/org/apache/lucene/search/suggest/document/SuggestIndexSearcher.java
@@ -67,7 +67,7 @@ public class SuggestIndexSearcher extends IndexSearcher {
     // TODO use IndexSearcher.rewrite instead
     // have to implement equals() and hashCode() in CompletionQuerys and co
     query = (CompletionQuery) query.rewrite(getIndexReader());
-    Weight weight = query.createWeight(this, collector.needsScores());
+    Weight weight = query.createWeight(this, collector.needsScores(), 1f);
     for (LeafReaderContext context : getIndexReader().leaves()) {
       BulkScorer scorer = weight.bulkScorer(context);
       if (scorer != null) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/test-framework/src/java/org/apache/lucene/index/BaseNormsFormatTestCase.java
----------------------------------------------------------------------
diff --git a/lucene/test-framework/src/java/org/apache/lucene/index/BaseNormsFormatTestCase.java b/lucene/test-framework/src/java/org/apache/lucene/index/BaseNormsFormatTestCase.java
index b6207be..ee70fb6 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/index/BaseNormsFormatTestCase.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/index/BaseNormsFormatTestCase.java
@@ -321,7 +321,7 @@ public abstract class BaseNormsFormatTestCase extends BaseIndexFileFormatTestCas
     }
 
     @Override
-    public SimWeight computeWeight(CollectionStatistics collectionStats, TermStatistics... termStats) {
+    public SimWeight computeWeight(float boost, CollectionStatistics collectionStats, TermStatistics... termStats) {
       throw new UnsupportedOperationException();
     }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/test-framework/src/java/org/apache/lucene/search/AssertingIndexSearcher.java
----------------------------------------------------------------------
diff --git a/lucene/test-framework/src/java/org/apache/lucene/search/AssertingIndexSearcher.java b/lucene/test-framework/src/java/org/apache/lucene/search/AssertingIndexSearcher.java
index 7bc4b4a..a9a7321 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/search/AssertingIndexSearcher.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/search/AssertingIndexSearcher.java
@@ -50,30 +50,11 @@ public class AssertingIndexSearcher extends IndexSearcher {
     super(context, ex);
     this.random = new Random(random.nextLong());
   }
-  
-  /** Ensures, that the returned {@code Weight} is not normalized again, which may produce wrong scores. */
-  @Override
-  public Weight createNormalizedWeight(Query query, boolean needsScores) throws IOException {
-    final Weight w = super.createNormalizedWeight(query, needsScores);
-    return new AssertingWeight(random, w, needsScores) {
-
-      @Override
-      public void normalize(float norm, float boost) {
-        throw new IllegalStateException("Weight already normalized.");
-      }
-
-      @Override
-      public float getValueForNormalization() {
-        throw new IllegalStateException("Weight already normalized.");
-      }
-
-    };
-  }
 
   @Override
-  public Weight createWeight(Query query, boolean needsScores) throws IOException {
+  public Weight createWeight(Query query, boolean needsScores, float boost) throws IOException {
     // this adds assertions to the inner weights/scorers too
-    return new AssertingWeight(random, super.createWeight(query, needsScores), needsScores);
+    return new AssertingWeight(random, super.createWeight(query, needsScores, boost), needsScores);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/test-framework/src/java/org/apache/lucene/search/AssertingQuery.java
----------------------------------------------------------------------
diff --git a/lucene/test-framework/src/java/org/apache/lucene/search/AssertingQuery.java b/lucene/test-framework/src/java/org/apache/lucene/search/AssertingQuery.java
index 9110f5c..9280711 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/search/AssertingQuery.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/search/AssertingQuery.java
@@ -39,8 +39,8 @@ public final class AssertingQuery extends Query {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    return new AssertingWeight(new Random(random.nextLong()), in.createWeight(searcher, needsScores), needsScores);
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    return new AssertingWeight(new Random(random.nextLong()), in.createWeight(searcher, needsScores, boost), needsScores);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/test-framework/src/java/org/apache/lucene/search/AssertingWeight.java
----------------------------------------------------------------------
diff --git a/lucene/test-framework/src/java/org/apache/lucene/search/AssertingWeight.java b/lucene/test-framework/src/java/org/apache/lucene/search/AssertingWeight.java
index 29ca12e..9f24f22 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/search/AssertingWeight.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/search/AssertingWeight.java
@@ -47,16 +47,6 @@ class AssertingWeight extends Weight {
   }
 
   @Override
-  public float getValueForNormalization() throws IOException {
-    return in.getValueForNormalization();
-  }
-
-  @Override
-  public void normalize(float norm, float boost) {
-    in.normalize(norm, boost);
-  }
-
-  @Override
   public Scorer scorer(LeafReaderContext context) throws IOException {
     final Scorer inScorer = in.scorer(context);
     assert inScorer == null || inScorer.docID() == -1;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/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 7e822f1..2db46ff 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
@@ -65,8 +65,8 @@ public class RandomApproximationQuery extends Query {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    final Weight weight = query.createWeight(searcher, needsScores);
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    final Weight weight = query.createWeight(searcher, needsScores, boost);
     return new RandomApproximationWeight(weight, new Random(random.nextLong()));
   }
 
@@ -92,16 +92,6 @@ public class RandomApproximationQuery extends Query {
     }
 
     @Override
-    public float getValueForNormalization() throws IOException {
-      return weight.getValueForNormalization();
-    }
-
-    @Override
-    public void normalize(float norm, float boost) {
-      weight.normalize(norm, boost);
-    }
-
-    @Override
     public Scorer scorer(LeafReaderContext context) throws IOException {
       final Scorer scorer = weight.scorer(context);
       if (scorer == null) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/test-framework/src/java/org/apache/lucene/search/similarities/RandomSimilarity.java
----------------------------------------------------------------------
diff --git a/lucene/test-framework/src/java/org/apache/lucene/search/similarities/RandomSimilarity.java b/lucene/test-framework/src/java/org/apache/lucene/search/similarities/RandomSimilarity.java
index 5a55a99..136d7e5 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/search/similarities/RandomSimilarity.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/search/similarities/RandomSimilarity.java
@@ -45,15 +45,6 @@ public class RandomSimilarity extends PerFieldSimilarityWrapper {
   }
   
   @Override
-  public float queryNorm(float sumOfSquaredWeights) {
-    if (shouldQueryNorm) {
-      return defaultSim.queryNorm(sumOfSquaredWeights);
-    } else {
-      return 1.0f;
-    }
-  }
-  
-  @Override
   public synchronized Similarity get(String field) {
     assert field != null;
     Similarity sim = previousMappings.get(field);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/test-framework/src/java/org/apache/lucene/search/spans/AssertingSpanQuery.java
----------------------------------------------------------------------
diff --git a/lucene/test-framework/src/java/org/apache/lucene/search/spans/AssertingSpanQuery.java b/lucene/test-framework/src/java/org/apache/lucene/search/spans/AssertingSpanQuery.java
index 544a53c..7de01e7 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/search/spans/AssertingSpanQuery.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/search/spans/AssertingSpanQuery.java
@@ -42,8 +42,8 @@ public class AssertingSpanQuery extends SpanQuery {
   }
 
   @Override
-  public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    SpanWeight weight = in.createWeight(searcher, needsScores);
+  public SpanWeight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    SpanWeight weight = in.createWeight(searcher, needsScores, boost);
     return new AssertingSpanWeight(searcher, weight);
   }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/test-framework/src/java/org/apache/lucene/search/spans/AssertingSpanWeight.java
----------------------------------------------------------------------
diff --git a/lucene/test-framework/src/java/org/apache/lucene/search/spans/AssertingSpanWeight.java b/lucene/test-framework/src/java/org/apache/lucene/search/spans/AssertingSpanWeight.java
index ae20d83..a0f4f7b 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/search/spans/AssertingSpanWeight.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/search/spans/AssertingSpanWeight.java
@@ -40,7 +40,7 @@ public class AssertingSpanWeight extends SpanWeight {
    * @throws IOException on error
    */
   public AssertingSpanWeight(IndexSearcher searcher, SpanWeight in) throws IOException {
-    super((SpanQuery) in.getQuery(), searcher, null);
+    super((SpanQuery) in.getQuery(), searcher, null, 1f);
     this.in = in;
   }
 
@@ -68,16 +68,6 @@ public class AssertingSpanWeight extends SpanWeight {
   }
 
   @Override
-  public float getValueForNormalization() throws IOException {
-    return in.getValueForNormalization();
-  }
-
-  @Override
-  public void normalize(float queryNorm, float boost) {
-    in.normalize(queryNorm, boost);
-  }
-
-  @Override
   public SpanScorer scorer(LeafReaderContext context) throws IOException {
     return in.scorer(context);
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/lucene/test-framework/src/test/org/apache/lucene/search/TestBaseExplanationTestCase.java
----------------------------------------------------------------------
diff --git a/lucene/test-framework/src/test/org/apache/lucene/search/TestBaseExplanationTestCase.java b/lucene/test-framework/src/test/org/apache/lucene/search/TestBaseExplanationTestCase.java
index 97ddd4a..0c342d9 100644
--- a/lucene/test-framework/src/test/org/apache/lucene/search/TestBaseExplanationTestCase.java
+++ b/lucene/test-framework/src/test/org/apache/lucene/search/TestBaseExplanationTestCase.java
@@ -73,8 +73,8 @@ public class TestBaseExplanationTestCase extends BaseExplanationTestCase {
       this.toggleExplainMatch = toggleExplainMatch;
       this.breakExplainScores = breakExplainScores;
     }
-    public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-      return new BrokenExplainWeight(this, super.createWeight(searcher,needsScores));
+    public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+      return new BrokenExplainWeight(this, super.createWeight(searcher,needsScores, boost));
     }
   }
   
@@ -107,12 +107,6 @@ public class TestBaseExplanationTestCase extends BaseExplanationTestCase {
     public void extractTerms(Set<Term> terms) {
       in.extractTerms(terms);
     }
-    public float getValueForNormalization() throws IOException {
-      return in.getValueForNormalization();
-    }
-    public void normalize(float norm, float boost) {
-      in.normalize(norm, boost);
-    }
     public Scorer scorer(LeafReaderContext context) throws IOException {
       return in.scorer(context);
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java b/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java
index 1942232..78cebd3 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java
@@ -257,7 +257,7 @@ public class RealTimeGetComponent extends SearchComponent
 
          if (rb.getFilters() != null) {
            for (Query q : rb.getFilters()) {
-             Scorer scorer = searcher.createWeight(q, false).scorer(ctx);
+             Scorer scorer = searcher.createWeight(q, false, 1f).scorer(ctx);
              if (scorer == null || segid != scorer.iterator().advance(segid)) {
                // filter doesn't match.
                docid = -1;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/solr/core/src/java/org/apache/solr/query/FilterQuery.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/query/FilterQuery.java b/solr/core/src/java/org/apache/solr/query/FilterQuery.java
index bd93bb6..785ab5c 100644
--- a/solr/core/src/java/org/apache/solr/query/FilterQuery.java
+++ b/solr/core/src/java/org/apache/solr/query/FilterQuery.java
@@ -73,18 +73,18 @@ public class FilterQuery extends ExtendedQueryBase {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needScores) throws IOException {
+  public Weight createWeight(IndexSearcher searcher, boolean needScores, float boost) throws IOException {
     // SolrRequestInfo reqInfo = SolrRequestInfo.getRequestInfo();
 
     if (!(searcher instanceof SolrIndexSearcher)) {
       // delete-by-query won't have SolrIndexSearcher
-      return new BoostQuery(new ConstantScoreQuery(q), 0).createWeight(searcher, needScores);
+      return new BoostQuery(new ConstantScoreQuery(q), 0).createWeight(searcher, needScores, 1f);
     }
 
     SolrIndexSearcher solrSearcher = (SolrIndexSearcher)searcher;
     DocSet docs = solrSearcher.getDocSet(q);
     // reqInfo.addCloseHook(docs);  // needed for off-heap refcounting
 
-    return new BoostQuery(new SolrConstantScoreQuery(docs.getTopFilter()), 0).createWeight(searcher, needScores);
+    return new BoostQuery(new SolrConstantScoreQuery(docs.getTopFilter()), 0).createWeight(searcher, needScores, 1f);
   }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/solr/core/src/java/org/apache/solr/query/SolrRangeQuery.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/query/SolrRangeQuery.java b/solr/core/src/java/org/apache/solr/query/SolrRangeQuery.java
index 80d407a..bed0ad5 100644
--- a/solr/core/src/java/org/apache/solr/query/SolrRangeQuery.java
+++ b/solr/core/src/java/org/apache/solr/query/SolrRangeQuery.java
@@ -138,8 +138,8 @@ public final class SolrRangeQuery extends ExtendedQueryBase implements DocSetPro
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needScores) throws IOException {
-    return new ConstWeight(searcher, needScores);
+  public Weight createWeight(IndexSearcher searcher, boolean needScores, float boost) throws IOException {
+    return new ConstWeight(searcher, needScores, boost);
     /*
     DocSet docs = createDocSet(searcher.getIndexReader().leaves(), searcher.getIndexReader().maxDoc());
     SolrConstantScoreQuery csq = new SolrConstantScoreQuery( docs.getTopFilter() );
@@ -324,8 +324,8 @@ public final class SolrRangeQuery extends ExtendedQueryBase implements DocSetPro
     final SegState[] segStates;
 
 
-    protected ConstWeight(IndexSearcher searcher, boolean needScores) {
-      super( SolrRangeQuery.this );
+    protected ConstWeight(IndexSearcher searcher, boolean needScores, float boost) {
+      super( SolrRangeQuery.this, boost );
       this.searcher = searcher;
       this.segStates = new SegState[ searcher.getIndexReader().leaves().size() ];
       this.needScores = needScores;
@@ -398,8 +398,7 @@ public final class SolrRangeQuery extends ExtendedQueryBase implements DocSetPro
           bq.add(new TermQuery(new Term( SolrRangeQuery.this.getField(), t.term), termContext), BooleanClause.Occur.SHOULD);
         }
         Query q = new ConstantScoreQuery(bq.build());
-        final Weight weight = searcher.rewrite(q).createWeight(searcher, needScores);
-        weight.normalize(1f, score());
+        final Weight weight = searcher.rewrite(q).createWeight(searcher, needScores, score());
         return segStates[context.ord] = new SegState(weight);
       }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/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 b50b35f..b6d1b52 100644
--- a/solr/core/src/java/org/apache/solr/schema/LatLonType.java
+++ b/solr/core/src/java/org/apache/solr/schema/LatLonType.java
@@ -309,8 +309,8 @@ class SpatialDistanceQuery extends ExtendedQueryBase implements PostFilter {
     protected Map latContext;
     protected Map lonContext;
 
-    public SpatialWeight(IndexSearcher searcher) throws IOException {
-      super(SpatialDistanceQuery.this);
+    public SpatialWeight(IndexSearcher searcher, float boost) throws IOException {
+      super(SpatialDistanceQuery.this, boost);
       this.searcher = searcher;
       this.latContext = ValueSource.newContext(searcher);
       this.lonContext = ValueSource.newContext(searcher);
@@ -491,7 +491,7 @@ class SpatialDistanceQuery extends ExtendedQueryBase implements PostFilter {
   @Override
   public DelegatingCollector getFilterCollector(IndexSearcher searcher) {
     try {
-      return new SpatialCollector(new SpatialWeight(searcher));
+      return new SpatialCollector(new SpatialWeight(searcher, 1f));
     } catch (IOException e) {
       throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, e);
     }
@@ -523,10 +523,10 @@ class SpatialDistanceQuery extends ExtendedQueryBase implements PostFilter {
 
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
     // if we were supposed to use bboxQuery, then we should have been rewritten using that query
     assert bboxQuery == null;
-    return new SpatialWeight(searcher);
+    return new SpatialWeight(searcher, boost);
   }
 
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/solr/core/src/java/org/apache/solr/search/ExportQParserPlugin.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/ExportQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/ExportQParserPlugin.java
index 8156f24..38bb74f 100644
--- a/solr/core/src/java/org/apache/solr/search/ExportQParserPlugin.java
+++ b/solr/core/src/java/org/apache/solr/search/ExportQParserPlugin.java
@@ -71,8 +71,8 @@ public class ExportQParserPlugin extends QParserPlugin {
       return null;
     }
 
-    public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException{
-      return mainQuery.createWeight(searcher, true);
+    public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException{
+      return mainQuery.createWeight(searcher, true, boost);
     }
 
     public Query rewrite(IndexReader reader) throws IOException {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/solr/core/src/java/org/apache/solr/search/Filter.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/Filter.java b/solr/core/src/java/org/apache/solr/search/Filter.java
index 0aa9417..f4a148c 100644
--- a/solr/core/src/java/org/apache/solr/search/Filter.java
+++ b/solr/core/src/java/org/apache/solr/search/Filter.java
@@ -88,21 +88,13 @@ public abstract class Filter extends Query {
   //
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
     return new Weight(this) {
 
       @Override
       public void extractTerms(Set<Term> terms) {}
 
       @Override
-      public float getValueForNormalization() throws IOException {
-        return 0f;
-      }
-
-      @Override
-      public void normalize(float norm, float boost) {}
-
-      @Override
       public Explanation explain(LeafReaderContext context, int doc) throws IOException {
         final Scorer scorer = scorer(context);
         final boolean match = (scorer != null && scorer.iterator().advance(doc) == doc);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/solr/core/src/java/org/apache/solr/search/GraphTermsQParserPlugin.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/GraphTermsQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/GraphTermsQParserPlugin.java
index dfe411a..a8a86cb 100644
--- a/solr/core/src/java/org/apache/solr/search/GraphTermsQParserPlugin.java
+++ b/solr/core/src/java/org/apache/solr/search/GraphTermsQParserPlugin.java
@@ -193,7 +193,7 @@ public class GraphTermsQParserPlugin extends QParserPlugin {
     }
 
     @Override
-    public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+    public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
 
       List<TermContext> finalContexts = new ArrayList();
       List<Term> finalTerms = new ArrayList();
@@ -208,7 +208,7 @@ public class GraphTermsQParserPlugin extends QParserPlugin {
         }
       }
 
-      return new ConstantScoreWeight(this) {
+      return new ConstantScoreWeight(this, boost) {
 
         @Override
         public void extractTerms(Set<Term> terms) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/solr/core/src/java/org/apache/solr/search/HashQParserPlugin.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/HashQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/HashQParserPlugin.java
index 2112c71..33a446a 100644
--- a/solr/core/src/java/org/apache/solr/search/HashQParserPlugin.java
+++ b/solr/core/src/java/org/apache/solr/search/HashQParserPlugin.java
@@ -112,7 +112,7 @@ public class HashQParserPlugin extends QParserPlugin {
       this.worker = worker;
     }
 
-    public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+    public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
 
       String[] keys = keysParam.split(",");
       SolrIndexSearcher solrIndexSearcher = (SolrIndexSearcher)searcher;
@@ -132,7 +132,7 @@ public class HashQParserPlugin extends QParserPlugin {
       }
 
       ConstantScoreQuery constantScoreQuery = new ConstantScoreQuery(new BitsFilter(fixedBitSets));
-      return searcher.rewrite(constantScoreQuery).createWeight(searcher, false);
+      return searcher.rewrite(constantScoreQuery).createWeight(searcher, false, boost);
     }
 
     public class BitsFilter extends Filter {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.java
index 2adec48..de96c96 100644
--- a/solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.java
+++ b/solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.java
@@ -146,8 +146,8 @@ class JoinQuery extends Query {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    return new JoinQueryWeight((SolrIndexSearcher)searcher);
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    return new JoinQueryWeight((SolrIndexSearcher)searcher, boost);
   }
 
   private class JoinQueryWeight extends ConstantScoreWeight {
@@ -157,8 +157,8 @@ class JoinQuery extends Query {
     private Similarity similarity;
     ResponseBuilder rb;
 
-    public JoinQueryWeight(SolrIndexSearcher searcher) {
-      super(JoinQuery.this);
+    public JoinQueryWeight(SolrIndexSearcher searcher, float boost) {
+      super(JoinQuery.this, boost);
       this.fromSearcher = searcher;
       SolrRequestInfo info = SolrRequestInfo.getRequestInfo();
       if (info != null) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/solr/core/src/java/org/apache/solr/search/ReRankQParserPlugin.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/ReRankQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/ReRankQParserPlugin.java
index 06974f2..03a1d33 100644
--- a/solr/core/src/java/org/apache/solr/search/ReRankQParserPlugin.java
+++ b/solr/core/src/java/org/apache/solr/search/ReRankQParserPlugin.java
@@ -174,8 +174,8 @@ public class ReRankQParserPlugin extends QParserPlugin {
       return super.rewrite(reader);
     }
 
-    public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException{
-      return new ReRankWeight(mainQuery, reRankQuery, reRankWeight, searcher, needsScores);
+    public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException{
+      return new ReRankWeight(mainQuery, reRankQuery, reRankWeight, searcher, needsScores, boost);
     }
   }
 
@@ -185,12 +185,12 @@ public class ReRankQParserPlugin extends QParserPlugin {
     private Weight mainWeight;
     private double reRankWeight;
 
-    public ReRankWeight(Query mainQuery, Query reRankQuery, double reRankWeight, IndexSearcher searcher, boolean needsScores) throws IOException {
+    public ReRankWeight(Query mainQuery, Query reRankQuery, double reRankWeight, IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
       super(mainQuery);
       this.reRankQuery = reRankQuery;
       this.searcher = searcher;
       this.reRankWeight = reRankWeight;
-      this.mainWeight = mainQuery.createWeight(searcher, needsScores);
+      this.mainWeight = mainQuery.createWeight(searcher, needsScores, boost);
     }
 
     @Override
@@ -199,18 +199,11 @@ public class ReRankQParserPlugin extends QParserPlugin {
 
     }
 
-    public float getValueForNormalization() throws IOException {
-      return mainWeight.getValueForNormalization();
-    }
-
+    @Override
     public Scorer scorer(LeafReaderContext context) throws IOException {
       return mainWeight.scorer(context);
     }
 
-    public void normalize(float norm, float topLevelBoost) {
-      mainWeight.normalize(norm, topLevelBoost);
-    }
-
     public Explanation explain(LeafReaderContext context, int doc) throws IOException {
       Explanation mainExplain = mainWeight.explain(context, doc);
       return new QueryRescorer(reRankQuery) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/solr/core/src/java/org/apache/solr/search/SolrConstantScoreQuery.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/SolrConstantScoreQuery.java b/solr/core/src/java/org/apache/solr/search/SolrConstantScoreQuery.java
index 6e55ad9..15d15f6 100644
--- a/solr/core/src/java/org/apache/solr/search/SolrConstantScoreQuery.java
+++ b/solr/core/src/java/org/apache/solr/search/SolrConstantScoreQuery.java
@@ -84,8 +84,8 @@ public class SolrConstantScoreQuery extends Query implements ExtendedQuery {
   protected class ConstantWeight extends ConstantScoreWeight {
     private Map context;
 
-    public ConstantWeight(IndexSearcher searcher) throws IOException {
-      super(SolrConstantScoreQuery.this);
+    public ConstantWeight(IndexSearcher searcher, float boost) throws IOException {
+      super(SolrConstantScoreQuery.this, boost);
       this.context = ValueSource.newContext(searcher);
       if (filter instanceof SolrFilter)
         ((SolrFilter)filter).createWeight(context, searcher);
@@ -107,8 +107,8 @@ public class SolrConstantScoreQuery extends Query implements ExtendedQuery {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    return new SolrConstantScoreQuery.ConstantWeight(searcher);
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    return new SolrConstantScoreQuery.ConstantWeight(searcher, boost);
   }
 
   /** Prints a user-readable version of this query. */

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/solr/core/src/java/org/apache/solr/search/WrappedQuery.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/WrappedQuery.java b/solr/core/src/java/org/apache/solr/search/WrappedQuery.java
index 974c6e5..b3bde2a 100644
--- a/solr/core/src/java/org/apache/solr/search/WrappedQuery.java
+++ b/solr/core/src/java/org/apache/solr/search/WrappedQuery.java
@@ -40,8 +40,8 @@ public final class WrappedQuery extends ExtendedQueryBase {
   }
 
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    return q.createWeight(searcher, needsScores);
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    return q.createWeight(searcher, needsScores, boost);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/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 3fca05a..8cfcf79 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
@@ -108,8 +108,8 @@ public class GraphQuery extends Query {
   }
   
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
-    Weight graphWeight = new GraphQueryWeight((SolrIndexSearcher)searcher);
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
+    Weight graphWeight = new GraphQueryWeight((SolrIndexSearcher)searcher, boost);
     return graphWeight;
   }
   
@@ -129,18 +129,18 @@ public class GraphQuery extends Query {
   
   protected class GraphQueryWeight extends Weight {
     
-    SolrIndexSearcher fromSearcher;
-    private float queryNorm = 1.0F;
-    private float queryWeight = 1.0F; 
+    final SolrIndexSearcher fromSearcher;
+    private final float boost;
     private int frontierSize = 0;
     private int currentDepth = -1;
     private Filter filter;
     private DocSet resultSet;
     
-    public GraphQueryWeight(SolrIndexSearcher searcher) {
+    public GraphQueryWeight(SolrIndexSearcher searcher, float boost) {
       // Grab the searcher so we can run additional searches.
       super(null);
       this.fromSearcher = searcher;
+      this.boost = boost;
     }
     
     @Override
@@ -157,16 +157,6 @@ public class GraphQuery extends Query {
       }
     }
     
-    @Override
-    public float getValueForNormalization() throws IOException {
-      return 1F;
-    }
-    
-    @Override
-    public void normalize(float norm, float topLevelBoost) {
-      this.queryWeight = norm * topLevelBoost;
-    }
-    
     /**
      * This computes the matching doc set for a given graph query
      * 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/solr/core/src/java/org/apache/solr/search/similarities/SchemaSimilarityFactory.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/similarities/SchemaSimilarityFactory.java b/solr/core/src/java/org/apache/solr/search/similarities/SchemaSimilarityFactory.java
index 355767a..e648481 100644
--- a/solr/core/src/java/org/apache/solr/search/similarities/SchemaSimilarityFactory.java
+++ b/solr/core/src/java/org/apache/solr/search/similarities/SchemaSimilarityFactory.java
@@ -73,9 +73,7 @@ import org.apache.solr.util.plugin.SolrCoreAware;
  * <code>Similarity</code> for some or all fields in a Query, the behavior can be inconsistent 
  * with the behavior of explicitly configuring that same <code>Similarity</code> globally, because 
  * of differences in how some multi-field / multi-clause behavior is defined in 
- * <code>PerFieldSimilarityWrapper</code>.  In particular please consider carefully the documentation 
- * &amp; implementation of {@link Similarity#queryNorm} in 
- * {@link ClassicSimilarity} compared to {@link PerFieldSimilarityWrapper}
+ * <code>PerFieldSimilarityWrapper</code>.
  * </p>
  *
  * @see FieldType#getSimilarity

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/solr/core/src/java/org/apache/solr/update/DeleteByQueryWrapper.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/update/DeleteByQueryWrapper.java b/solr/core/src/java/org/apache/solr/update/DeleteByQueryWrapper.java
index 330e767..4630b7f 100644
--- a/solr/core/src/java/org/apache/solr/update/DeleteByQueryWrapper.java
+++ b/solr/core/src/java/org/apache/solr/update/DeleteByQueryWrapper.java
@@ -65,10 +65,10 @@ final class DeleteByQueryWrapper extends Query {
   }
   
   @Override
-  public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException {
+  public Weight createWeight(IndexSearcher searcher, boolean needsScores, float boost) throws IOException {
     final LeafReader wrapped = wrap((LeafReader) searcher.getIndexReader());
     final IndexSearcher privateContext = new IndexSearcher(wrapped);
-    final Weight inner = in.createWeight(privateContext, needsScores);
+    final Weight inner = in.createWeight(privateContext, needsScores, boost);
     return new Weight(DeleteByQueryWrapper.this) {
       @Override
       public void extractTerms(Set<Term> terms) {
@@ -79,12 +79,6 @@ final class DeleteByQueryWrapper extends Query {
       public Explanation explain(LeafReaderContext context, int doc) throws IOException { throw new UnsupportedOperationException(); }
 
       @Override
-      public float getValueForNormalization() throws IOException { return inner.getValueForNormalization(); }
-
-      @Override
-      public void normalize(float norm, float topLevelBoost) { inner.normalize(norm, topLevelBoost); }
-
-      @Override
       public Scorer scorer(LeafReaderContext context) throws IOException {
         return inner.scorer(privateContext.getIndexReader().leaves().get(0));
       }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/solr/core/src/test/org/apache/solr/DisMaxRequestHandlerTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/DisMaxRequestHandlerTest.java b/solr/core/src/test/org/apache/solr/DisMaxRequestHandlerTest.java
index 8d1b758..a8070fa 100644
--- a/solr/core/src/test/org/apache/solr/DisMaxRequestHandlerTest.java
+++ b/solr/core/src/test/org/apache/solr/DisMaxRequestHandlerTest.java
@@ -86,8 +86,8 @@ public class DisMaxRequestHandlerTest extends SolrTestCaseJ4 {
             req("cool stuff")
             ,"//*[@numFound='3']"
             ,"//result/doc[1]/int[@name='id'][.='42']"
-            ,"//result/doc[2]/int[@name='id'][.='666']"
-            ,"//result/doc[3]/int[@name='id'][.='8675309']"
+            ,"//result/doc[2]/int[@name='id'][.='8675309']"
+            ,"//result/doc[3]/int[@name='id'][.='666']"
             );
 
     assertQ("multi qf",

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/solr/core/src/test/org/apache/solr/cloud/DistribJoinFromCollectionTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/DistribJoinFromCollectionTest.java b/solr/core/src/test/org/apache/solr/cloud/DistribJoinFromCollectionTest.java
index ae17ca9..d0d79f6 100644
--- a/solr/core/src/test/org/apache/solr/cloud/DistribJoinFromCollectionTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/DistribJoinFromCollectionTest.java
@@ -146,7 +146,7 @@ public class DistribJoinFromCollectionTest extends SolrCloudTestCase{
   private void testJoins(String toColl, String fromColl, Integer toDocId, boolean isScoresTest)
       throws SolrServerException, IOException {
     // verify the join with fromIndex works
-    final String fromQ = "match_s:c match_s:not_1_0_score_after_weight_normalization";
+    final String fromQ = "match_s:c^2";
     CloudSolrClient client = cluster.getSolrClient();
     {
     final String joinQ = "{!join " + anyScoreMode(isScoresTest)

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5def78ba/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 6b36375..d895697 100644
--- a/solr/core/src/test/org/apache/solr/search/TestRankQueryPlugin.java
+++ b/solr/core/src/test/org/apache/solr/search/TestRankQueryPlugin.java
@@ -109,8 +109,8 @@ public class TestRankQueryPlugin extends QParserPlugin {
       return false;
     }
 
-    public Weight createWeight(IndexSearcher indexSearcher, boolean needsScores) throws IOException{
-      return q.createWeight(indexSearcher, needsScores);
+    public Weight createWeight(IndexSearcher indexSearcher, boolean needsScores, float boost) throws IOException{
+      return q.createWeight(indexSearcher, needsScores, boost);
     }
 
     @Override