You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2012/03/23 11:35:26 UTC
svn commit: r1304270 - in /lucene/dev/branches/branch_3x: ./ lucene/
lucene/contrib/facet/
lucene/contrib/join/src/java/org/apache/lucene/search/join/
lucene/contrib/spellchecker/ solr/ solr/core/
Author: mikemccand
Date: Fri Mar 23 10:35:25 2012
New Revision: 1304270
URL: http://svn.apache.org/viewvc?rev=1304270&view=rev
Log:
make the connetion between TPBJC's trackScores and TPBJQ's ScoreMode more transparent
Modified:
lucene/dev/branches/branch_3x/ (props changed)
lucene/dev/branches/branch_3x/lucene/ (props changed)
lucene/dev/branches/branch_3x/lucene/contrib/facet/ (props changed)
lucene/dev/branches/branch_3x/lucene/contrib/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinCollector.java
lucene/dev/branches/branch_3x/lucene/contrib/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinQuery.java
lucene/dev/branches/branch_3x/lucene/contrib/spellchecker/ (props changed)
lucene/dev/branches/branch_3x/solr/ (props changed)
lucene/dev/branches/branch_3x/solr/core/ (props changed)
Modified: lucene/dev/branches/branch_3x/lucene/contrib/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinCollector.java?rev=1304270&r1=1304269&r2=1304270&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinCollector.java (original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinCollector.java Fri Mar 23 10:35:25 2012
@@ -112,7 +112,9 @@ public class ToParentBlockJoinCollector
private float maxScore = Float.NaN;
/* Creates a ToParentBlockJoinCollector. The provided sort must
- * not be null. */
+ * not be null. If you pass true trackScores, all
+ * ToParentBlockQuery instances must not use
+ * ScoreMode.None. */
public ToParentBlockJoinCollector(Sort sort, int numParentHits, boolean trackScores, boolean trackMaxScore) throws IOException {
// TODO: allow null sort to be specialized to relevance
// only collector
Modified: lucene/dev/branches/branch_3x/lucene/contrib/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/contrib/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinQuery.java?rev=1304270&r1=1304269&r2=1304270&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/contrib/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinQuery.java (original)
+++ lucene/dev/branches/branch_3x/lucene/contrib/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinQuery.java Fri Mar 23 10:35:25 2012
@@ -277,7 +277,7 @@ public class ToParentBlockJoinQuery exte
float[] swapChildScores(float[] other) {
if (scoreMode == ScoreMode.None) {
- throw new IllegalStateException("ScoreMode is None");
+ throw new IllegalStateException("ScoreMode is None; you must pass trackScores=false to ToParentBlockJoinCollector");
}
final float[] ret = pendingChildScores;
if (other == null) {