mirror of https://github.com/apache/lucene.git
make the connetion between TPBJC's trackScores and TPBJQ's ScoreMode more transparent
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1304269 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6c73b26c93
commit
8f21ee61cb
|
@ -18,7 +18,7 @@ package org.apache.lucene.search.join;
|
|||
*/
|
||||
|
||||
import org.apache.lucene.index.AtomicReaderContext;
|
||||
import org.apache.lucene.index.IndexWriter;
|
||||
import org.apache.lucene.index.IndexWriter; // javadocs
|
||||
import org.apache.lucene.search.*;
|
||||
import org.apache.lucene.search.Scorer.ChildScorer;
|
||||
import org.apache.lucene.search.grouping.GroupDocs;
|
||||
|
@ -100,7 +100,9 @@ public class ToParentBlockJoinCollector extends Collector {
|
|||
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
|
||||
|
|
|
@ -267,7 +267,7 @@ public class ToParentBlockJoinQuery extends Query {
|
|||
|
||||
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) {
|
||||
|
|
Loading…
Reference in New Issue