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


##########
solr/core/src/java/org/apache/solr/handler/admin/IndexSizeEstimator.java:
##########
@@ -391,12 +391,12 @@ private void estimateTermVectors(Map<String, Object> 
result) throws IOException
         if (liveDocs != null && !liveDocs.get(docId)) {
           continue;
         }
-        Fields vectors = termVectors.get(docId);
-        if (vectors == null) {
+        Fields fields = termVectors.get(docId);
+        if (fields == null) {

Review Comment:
   I disagree with this.  The class name "Fields" is terrible; I've tried to 
bring about a change there but it stalled.  The least we can do is choose an 
appropriate variable name.  I propose `termVectors`.



##########
solr/core/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java:
##########
@@ -432,6 +432,21 @@ protected BoundaryScanner getBoundaryScanner(String 
fieldName, SolrParams params
     return solrBs.getBoundaryScanner(fieldName, params);
   }
 
+  private static final class TermVectorsSupplier {

Review Comment:
   I don't think we need this class.  See `org.apache.lucene.util.IOSupplier` 
which you could create an anonymous instance of at the point that you construct 
this.



##########
solr/core/src/java/org/apache/solr/search/SolrDocumentFetcher.java:
##########
@@ -372,7 +372,7 @@ public void doc(int docId, StoredFieldVisitor visitor) 
throws IOException {
       Document cached = doc(docId);
       visitFromCached(cached, visitor);
     } else {
-      searcher.getIndexReader().document(docId, visitor);
+      searcher.getIndexReader().storedFields().document(docId, visitor);

Review Comment:
   If a performance benchmark returning, say, 1000 docs (not big docs) is not 
impacted, I suppose the change as-is is fine albeit not ideal.



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