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


##########
solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java:
##########
@@ -169,6 +160,20 @@ public void prepare(ResponseBuilder rb) throws IOException 
{
 
     try {
       QParser parser = QParser.getParser(rb.getQueryString(), defType, req);
+
+      SortSpec sortSpec = parser.getSortSpec(true);
+      rb.setSortSpec(sortSpec);
+      boolean someDocs = sortSpec == null || sortSpec.getCount() != 0;
+
+      // Set field flags

Review Comment:
   The try-catch is about query parsing / syntax errors; sortSpec & 
returnFields is separate; perhaps should go after.



##########
solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java:
##########
@@ -147,15 +147,6 @@ public void prepare(ResponseBuilder rb) throws IOException 
{
       }
     }
 
-    // Set field flags

Review Comment:
   BTW, I cannot figure out why "field" is  used to describe/qualify the flags. 
 If you can't either, I recommend as you move this comment to simply omit the 
"field" word.



##########
solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java:
##########
@@ -1682,7 +1684,6 @@ private void getDocListC(QueryResult qr, QueryCommand 
cmd) throws IOException {
         }
       }
     } else {
-      fullSortCount.increment();

Review Comment:
   nocommit -- to move elsewhere still



##########
solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java:
##########
@@ -169,6 +160,20 @@ public void prepare(ResponseBuilder rb) throws IOException 
{
 
     try {
       QParser parser = QParser.getParser(rb.getQueryString(), defType, req);
+
+      SortSpec sortSpec = parser.getSortSpec(true);
+      rb.setSortSpec(sortSpec);
+      boolean someDocs = sortSpec == null || sortSpec.getCount() != 0;
+
+      // Set field flags

Review Comment:
   I was anticipating seeing a rows check in changes to QueryComponent but 
don't see it yet



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