ijioio commented on pull request #479:
URL: https://github.com/apache/solr/pull/479#issuecomment-1006680521


   > Yes, if the response format were to change that would need to be clearly 
communicated to users e.g. via the 
https://github.com/apache/solr/blob/main/solr/CHANGES.txt and/or 
https://github.com/apache/solr/blob/main/solr/solr-ref-guide/src/major-changes-in-solr-9.adoc
 notes, because as you say someone might depend on its content or format.
   
   Initially, I was not hoping to go that far as changing the response format. 
But I personally think this is the best option if possible, especially taking 
into account another issue concerning responses unification.
   
   > At least in the case of the `BACKUPCORE` here much of the `Response` seems 
more like a repeat of the request parameters rather than response information 
content.
   
   Yes, you're absolutely right. All the `Response` value is actually is the 
content of the `toLog` list located inside the 
`org.apache.solr.response.SolrQueryResponse`. It is filled only on 
`preDecorateResponse` and `postDecorateResponse` calls within 
`org.apache.solr.servlet.HttpSolrCall.handleAdminRequest()`:
   
   ```java
     private void handleAdminRequest() throws IOException {
       SolrQueryResponse solrResp = new SolrQueryResponse();
       SolrCore.preDecorateResponse(solrReq, solrResp);
       handleAdmin(solrResp);
       SolrCore.postDecorateResponse(handler, solrReq, solrResp);
       ....
     }
   ```
   
   Nothing much of the interest is added there: path, query parameters, time, 
status, and handling echo parameters if provided. In the case of backup, only 
an async id is added there.
   
   > So changing the response format could be practical then? Having Response 
and response elements co-exist seems to me confusing in the long-term and for 
new users.
   
   Agree! It is confusing. I think, if possible, replacing the current 
`Response` block with a standard `response` is a good option. Maybe we can 
investigate in that way?
   
   > That's very insightful, thanks. I wonder what updating the 
aggregateResults might look like, the method has private visibility and so 
changing its signature (if necessary) would be easily possible.
   
   That's true. It will not be a problem to update it if needed.


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