cpoerschke commented on code in PR #2506:
URL: https://github.com/apache/solr/pull/2506#discussion_r1638095981


##########
solr/core/src/test/org/apache/solr/search/RankQueryTest.java:
##########
@@ -106,4 +119,65 @@ public void testPluggableCollector() {
         "//result/doc[2]/str[@name='id'][.='6']",
         "//result/doc[1]/str[@name='id'][.='5']");
   }
+
+  // The following static classes are intended to ensure that support of 
covariant
+  // ScoreDocs is supported in rank queries. MyRankQuery will fail to compile
+  // if covariant ScoreDocs are not supported because it returns a 
TopDocsCollector
+  // for MyScoreDoc (a subtype of ScoreDoc).
+  static class MyScoreDoc extends ScoreDoc {
+    public int someOtherField = 0;

Review Comment:
   My bad, I meant `final public int someOtherField` here i.e. forgot to remove 
the ` = 0` when making the suggestion. 
https://github.com/apache/solr/pull/2506/commits/4bd9f94210e66ad1c0bd1d3abf5226fbc608307f
 to add the `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: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to