jpountz commented on code in PR #13440: URL: https://github.com/apache/lucene/pull/13440#discussion_r1622334950
########## lucene/core/src/java/org/apache/lucene/search/Scorer.java: ########## @@ -26,27 +25,7 @@ * increasing order of doc id. */ public abstract class Scorer extends Scorable { - - /** the Scorer's parent Weight */ - protected final Weight weight; - - /** - * Constructs a Scorer - * - * @param weight The scorers <code>Weight</code>. - */ - protected Scorer(Weight weight) { - this.weight = Objects.requireNonNull(weight); - } - - /** - * returns parent Weight - * - * @lucene.experimental - */ - public Weight getWeight() { - return weight; - } + protected Scorer() {} Review Comment: I'm almost surprised that the build didn't fail due to missing javadocs, I thought we had such a check (which also required us to define no-arg constructors explicitly). Can you add javadocs? ########## lucene/CHANGES.txt: ########## @@ -458,7 +460,8 @@ API Changes IndexSearcher#search(Query, CollectorManager) for TopFieldCollectorManager and TopScoreDocCollectorManager. (Zach Chen, Adrien Grand, Michael McCandless, Greg Miller, Luca Cavanna) -* GITHUB#12854: Mark DrillSideways#createDrillDownFacetsCollector as @Deprecated. (Greg Miller) +* GITHUB#12854: Mark DrillSideways#createDrillDownFacetsCollector as @ +Deprecated. (Greg Miller) Review Comment: Undo the new line? ########## lucene/core/src/java/org/apache/lucene/search/Scorer.java: ########## @@ -39,15 +39,6 @@ protected Scorer(Weight weight) { this.weight = Objects.requireNonNull(weight); Review Comment: Can you also remove the `Weight` parameter from the constructor? This is the most annoying bit to me. ########## lucene/core/src/java/org/apache/lucene/search/Scorer.java: ########## @@ -26,27 +25,7 @@ * increasing order of doc id. */ public abstract class Scorer extends Scorable { - - /** the Scorer's parent Weight */ - protected final Weight weight; - - /** - * Constructs a Scorer - * - * @param weight The scorers <code>Weight</code>. - */ - protected Scorer(Weight weight) { - this.weight = Objects.requireNonNull(weight); - } - - /** - * returns parent Weight - * - * @lucene.experimental - */ - public Weight getWeight() { - return weight; - } + protected Scorer() {} Review Comment: I'm almost surprised that the build didn't fail due to missing javadocs, I thought we had such a check (which also required us to define no-arg constructors explicitly). Can you add javadocs? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org