risdenk commented on code in PR #1146:
URL: https://github.com/apache/solr/pull/1146#discussion_r1008410573
##########
solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java:
##########
@@ -290,24 +290,22 @@ public static GroupHeadSelector build(final SolrParams
localParams) {
}
public static class CollapsingPostFilter extends ExtendedQueryBase
implements PostFilter {
-
- private String collapseField;
+ private final String collapseField;
private final GroupHeadSelector groupHeadSelector;
private final SortSpec sortSpec; // may be null, parsed at most once from
groupHeadSelector
+ private final boolean needsScores;
+ private final boolean needsScores4Collapsing;
+ private final NullPolicy nullPolicy;
+ private final int size;
+
+ // TODO SOLR-16509 make all fields final
public String hint;
- private boolean needsScores = true;
- private boolean needsScores4Collapsing = false;
Review Comment:
These values were being set correctly already in constructor. they were
labeled as redundant by IDE - so remove the default value and set to final.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]