feat(deps): upgrade solr-solrj from 9.9.0 to 10.0.0#58
Open
adityamparikh wants to merge 9 commits intoapache:mainfrom
Open
feat(deps): upgrade solr-solrj from 9.9.0 to 10.0.0#58adityamparikh wants to merge 9 commits intoapache:mainfrom
adityamparikh wants to merge 9 commits intoapache:mainfrom
Conversation
Replace the default BinaryResponseParser (wt=javabin) with a custom JsonResponseParser (wt=json) for future-proofing and improved debuggability. The JsonResponseParser converts Solr's JSON response envelope into the NamedList<Object> tree that SolrJ typed response classes expect: - JSON objects → SimpleOrderedMap (extends NamedList, implements Map, satisfying both QueryResponse's NamedList casts and SchemaResponse's Map cast) - JSON objects with numFound+docs → SolrDocumentList - Flat alternating arrays [String, non-String, ...] → SimpleOrderedMap (Solr's json.nl=flat encoding for facet counts) - All other arrays → List - Decimal numbers → Float (matching JavaBin's float type, required by SchemaResponse's (Float) version cast) - Small integers → Integer, large integers → Long Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com>
Extract JsonResponseParser instantiation into a dedicated @bean method so it can be injected as a dependency into solrClient(), making the wiring explicit and enabling overriding in tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com>
Replace the static new ObjectMapper() with Spring's auto-configured ObjectMapper bean injected via constructor. Use MediaType.APPLICATION_JSON_VALUE for the content type constant instead of a raw string literal. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com>
…'s ObjectMapper Extract URL normalization tests from SolrConfigTest into a dedicated SolrConfigUrlNormalizationTest annotated with @jsontest, so Spring's auto-configured ObjectMapper is injected rather than using new ObjectMapper(). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com>
… Solr 10 SolrInfoMBeanHandler (and thus the /admin/mbeans endpoint) was removed in Solr 10. When getCacheMetrics() or getHandlerMetrics() call this endpoint on a Solr 10 server, SolrJ throws RemoteSolrException (a RuntimeException) because the server returns an HTML 404 page instead of JSON. Widen the catch in both methods to include RuntimeException so the server degrades gracefully (returning null for cache/handler stats) rather than propagating the exception. The integration tests already handle null stats, so all tests now pass with solr:10-slim. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com>
Add Solr 9.10 and 10 to the CI compatibility matrix, running integration tests against all supported versions (8.11, 9.4, 9.9, 9.10, 10) on every PR and push to main. Also update AGENTS.md to document Solr 10 compatibility status: the /admin/mbeans endpoint removal is handled gracefully, and all other functionality is verified working with solr:10-slim. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com>
- Bump solr version to 10.0.0 in libs.versions.toml - Remove Jetty BOM alignment (Solr 10 uses Jetty 12; no longer needed) - Remove Apache HttpComponents exclusion (SolrJ 10 no longer uses it) - Replace Http2SolrClient with HttpJdkSolrClient (new JDK HTTP client) - Move SolrQuery import: solrj → solrj.request package - Move ResponseParser import: solrj → solrj.response package - Adapt ResponseParser: getContentType() → getContentTypes() returning Collection<String>; remove processResponse(Reader) (no longer abstract) - Fix CoreAdminResponse.getCoreStatus(): now returns Map<String, SingleCoreData> instead of NamedList — update listCollections() and CollectionServiceTest accordingly All unit and Testcontainers integration tests pass. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com>
5 tasks
adityamparikh
added a commit
to adityamparikh/solr-mcp
that referenced
this pull request
Mar 8, 2026
…o sb4 Incorporates: - feat(config): switch Solr wire format from JavaBin to JSON (apache#55) - fix(collection): catch RuntimeException from removed /admin/mbeans in Solr 10 (apache#59) - feat(ci): add Solr 9.10 and 10 compatibility testing (apache#59) - feat(deps): upgrade solr-solrj from 9.9.0 to 10.0.0 (apache#58) Adapted JsonResponseParser for Jackson 3 (tools.jackson.databind). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com>
- S1488: return stream expression directly in validateCollectionExists instead of assigning to local variable - S7467: replace unused caught exceptions with _ (Java 25 unnamed variables) in CollectionService and SolrConfigUrlNormalizationTest Signed-off-by: Aditya Parikh <aditya.m.parikh@gmail.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com>
Merged upstream observability (OpenTelemetry/LGTM) and docs fixes. Kept branch-specific SolrJ 10 compatibility changes in CollectionService. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Aditya Parikh <adityamparikh@apache.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades
solr-solrjfrom 9.9.0 → 10.0.0, taking advantage of the JSON wire format (#55) and Solr 10 compatibility (#59) already in place.solrversion inlibs.versions.tomlto10.0.0Http2SolrClientwithHttpJdkSolrClient(new JDK-native HTTP client)SolrQueryimport:solrj→solrj.requestpackageResponseParserimport:solrj→solrj.responsepackageJsonResponseParser:getContentType()→getContentTypes()returningCollection<String>; removesprocessResponse(Reader)(no longer abstract)CoreAdminResponse.getCoreStatus(): now returnsMap<String, SingleCoreData>instead ofNamedListPR chain
feat/json-wire-format→main(JSON wire format)solr-10→main(Solr 10 compat, built on feat(config): switch Solr wire format from JavaBin to JSON #55)solrj-10→main(this PR: SolrJ 10 upgrade, built on feat(compat): add Solr 10 support with /admin/metrics migration #59)Merge in order. After #59 merges, this PR will show only the 1 SolrJ upgrade commit.
Test plan
./gradlew buildpasses🤖 Generated with Claude Code