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 2015/06/25 19:22:03 UTC
svn commit: r1687588 - in /lucene/dev/branches/branch_5x: ./ lucene/
lucene/core/ lucene/core/src/java/org/apache/lucene/search/Weight.java
Author: jpountz
Date: Thu Jun 25 17:22:03 2015
New Revision: 1687588
URL: http://svn.apache.org/r1687588
Log:
LUCENE-6553: Fixes to Weight's javadoc.
Modified:
lucene/dev/branches/branch_5x/ (props changed)
lucene/dev/branches/branch_5x/lucene/ (props changed)
lucene/dev/branches/branch_5x/lucene/core/ (props changed)
lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/Weight.java
Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/Weight.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/Weight.java?rev=1687588&r1=1687587&r2=1687588&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/Weight.java (original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/search/Weight.java Thu Jun 25 17:22:03 2015
@@ -21,6 +21,7 @@ import java.io.IOException;
import java.util.Set;
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;
@@ -97,11 +98,14 @@ public abstract class Weight {
public abstract void normalize(float norm, float topLevelBoost);
/**
- * Returns a {@link Scorer} which scores documents in/out-of order according
- * to <code>scoreDocsInOrder</code>.
+ * Returns a {@link Scorer} which can iterate in order over all matching
+ * documents and assign them a score.
* <p>
* <b>NOTE:</b> null can be returned if no documents will be scored by this
* query.
+ * <p>
+ * <b>NOTE</b>: The returned {@link Scorer} does not have
+ * {@link LeafReader#getLiveDocs()} applied, they need to be checked on top.
*
* @param context
* the {@link org.apache.lucene.index.LeafReaderContext} for which to return the {@link Scorer}.
@@ -117,7 +121,7 @@ public abstract class Weight {
* Only queries that have a different top-level approach
* need to override this; the default implementation
* pulls a normal {@link Scorer} and iterates and
- * collects the resulting hits.
+ * collects the resulting hits which are not marked as deleted.
*
* @param context
* the {@link org.apache.lucene.index.LeafReaderContext} for which to return the {@link Scorer}.