epugh commented on code in PR #4181:
URL: https://github.com/apache/solr/pull/4181#discussion_r2879247754


##########
solr/core/src/java/org/apache/solr/handler/admin/api/RealTimeGetAPI.java:
##########
@@ -30,19 +34,25 @@
  * <p>This API (GET /v2/collections/collectionName/get) is analogous to the v1
  * /solr/collectionName/get API.
  */
-public class RealTimeGetAPI {
+public class RealTimeGetAPI extends JerseyResource implements RealTimeGetApi {
 
   private final RealTimeGetHandler rtgHandler;
+  private final SolrQueryRequest solrQueryRequest;
+  private final SolrQueryResponse solrQueryResponse;
 
-  public RealTimeGetAPI(RealTimeGetHandler rtgHandler) {
-    this.rtgHandler = rtgHandler;
+  @Inject
+  public RealTimeGetAPI(
+      SolrCore solrCore, SolrQueryRequest solrQueryRequest, SolrQueryResponse 
solrQueryResponse) {
+    this.rtgHandler = (RealTimeGetHandler) solrCore.getRequestHandler("/get");
+    this.solrQueryRequest = solrQueryRequest;
+    this.solrQueryResponse = solrQueryResponse;
   }
 
-  @EndPoint(
-      path = {"/get"},
-      method = GET,
-      permission = PermissionNameProvider.Name.READ_PERM)
-  public void getDocuments(SolrQueryRequest req, SolrQueryResponse rsp) throws 
Exception {
-    rtgHandler.handleRequestBody(req, rsp);
+  @Override
+  @PermissionName(PermissionNameProvider.Name.READ_PERM)
+  public FlexibleSolrJerseyResponse getDocuments(String id, List<String> ids) 
throws Exception {
+    final var response = 
instantiateJerseyResponse(FlexibleSolrJerseyResponse.class);
+    rtgHandler.handleRequestBody(solrQueryRequest, solrQueryResponse);
+    return response;

Review Comment:
   added some docs!



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to