epugh opened a new pull request, #4181:
URL: https://github.com/apache/solr/pull/4181
Migrates `RealTimeGetHandler`'s V2 API from the legacy
`@EndPoint`/`AnnotatedApi` pattern to standard JAX-RS annotations, consistent
with other V2 APIs. RTG logic stays in `RealTimeGetHandler`; the new Jersey
resource delegates to it. Also upgrades the generated SolrJ client to expose
`id`/`ids` query params and fixes a gap in the Jersey JSON response path.
## API Interface (`solr/api`)
- New `RealTimeGetApi`: `@Path(INDEX_PATH_PREFIX + "/get")`, `@GET
getDocuments(@QueryParam("id"), @QueryParam("ids"))`, returns
`FlexibleSolrJerseyResponse` to capture dynamic RTG fields (`doc`, `response`)
## Implementation (`solr/core`)
- `RealTimeGetAPI` extends `JerseyResource`, implements `RealTimeGetApi`,
uses `@Inject` constructor; delegates to `RealTimeGetHandler` via
`solrCore.getRequestHandler("/get")`
- `RealTimeGetHandler`: replaced `AnnotatedApi`/`getApis()` with
`getJerseyResources()` returning `RealTimeGetAPI.class`
## JSON MessageBodyWriter
Previously JAX-RS `application/json` responses bypassed Solr's
`QueryResponseWriter` pipeline (using Jersey's default Jackson serializer
directly), so dynamic fields added by V1 handlers to `SolrQueryResponse` were
invisible to `JacksonDataBindResponseParser`-based clients. Added
`JsonMessageBodyWriter` — routes JSON responses through `JSONResponseWriter` +
`squashIntoSolrResponseWithHeader`, consistent with the existing javabin/xml
writers.
## Generated SolrJ Client
`DocumentsApi.GetDocuments` (generated from the updated OAS) now exposes
`setId(String)` and `setIds(List<String>)`.
## Tests
- `RealTimeGetAPITest`: integration test via `SolrJettyTestRule`;
`testGetDocumentsByIds` uses the generated `DocumentsApi.GetDocuments` class
end-to-end
- `V2ApiIntegrationTest`: removed `_introspect` assertions on JAX-RS
endpoints (`/select/_introspect`, `/get/_introspect`) — `_introspect` is not
supported on JAX-RS resources; `testWTParam`/`testInvalidWTParamReturnsError`
now use collection-level `/_introspect`
--
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]