dsmiley commented on code in PR #3222:
URL: https://github.com/apache/solr/pull/3222#discussion_r2075879174


##########
solr/core/src/java/org/apache/solr/search/SolrReturnFields.java:
##########
@@ -50,6 +51,7 @@
 public class SolrReturnFields extends ReturnFields {
   // Special Field Keys
   public static final String SCORE = "score";
+  public static final String MATCH_SCORE = "matchScore";

Review Comment:
   I'm not loving another special case, vs a special function like say 
`matchScore()`.  If we were starting Solr from scratch, even `score` would be 
`score()` IMO.



##########
solr/core/src/java/org/apache/solr/search/DocIterator.java:
##########
@@ -24,7 +24,7 @@
  * <p>The order of the documents is determined by the context in which the 
DocIterator instance was
  * retrieved.
  */
-public interface DocIterator extends Iterator<Integer> {
+public interface DocIterator extends Iterator<Integer>, DocIterationInfo {

Review Comment:
   hmm; not sure this is really better.  Maybe a hasScore was needed?



##########
solr/core/src/java/org/apache/solr/search/TopDocsSlice.java:
##########
@@ -0,0 +1,134 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.search;
+
+import org.apache.lucene.search.TopDocs;
+import org.apache.lucene.search.TotalHits;
+
+/**
+ * <code>TopDocsSlice</code> implements DocList based off provided 
<code>TopDocs</code>.
+ *
+ * @since solr 9.9
+ */
+public class TopDocsSlice extends DocSlice {

Review Comment:
   A very welcome addition; thanks



##########
solr/solrj/src/java/org/apache/solr/common/SolrDocument.java:
##########
@@ -195,6 +197,19 @@ public Collection<Object> getFieldValues(String name) {
     return null;
   }
 
+  /** Get the value or collection of values for a given field. */
+  public Map<String, Object> getSubsetOfFields(Set<String> fieldNames) {

Review Comment:
   I'd suggest we be conservative about adding helper methods like this to 
major/popular Solr classes, without first identifying that it's widely useful.



-- 
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