You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "gerlowskija (via GitHub)" <gi...@apache.org> on 2025/03/31 18:46:43 UTC

[PR] SOLR-16395: Convert v2 "schema" modification APIs to JAX-RS [solr]

gerlowskija opened a new pull request, #3299:
URL: https://github.com/apache/solr/pull/3299

   https://issues.apache.org/jira/browse/SOLR-16395\
   
   # Description
   
   Many v2 APIs remain on the legacy v2 API framework, including a number of APIs allowing individual and bulk modifications to collection schemas.
   
   # Solution
   
   This PR converts a number of Solr's schema-modification APIs to JAX-RS, including:
   
   - TBD
   
   This has the additional benefit of adding the APIs to our OpenAPI spec ("OAS"), and to all of the downstream artifacts (e.g. SolrJ bindings) generated from that.
   
   # Tests
   
   See new tests (mostly serialization/deserialization related) in `SchemaManagerUtilsTest` and `SchemaChangeOperationSerializationTest`.
   
   # Checklist
   
   Please review the following and check all that apply:
   
   - [x] I have reviewed the guidelines for [How to Contribute](https://github.com/apache/solr/blob/main/CONTRIBUTING.md) and my code conforms to the standards described there to the best of my ability.
   - [x] I have created a Jira issue and added the issue ID to my pull request title.
   - [x] I have given Solr maintainers [access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork) to contribute to my PR branch. (optional but recommended, not available for branches on forks living under an organisation)
   - [x] I have developed this patch against the `main` branch.
   - [ ] I have run `./gradlew check`.
   - [ ] I have added tests for my changes.
   - [ ] I have added documentation for the [Reference Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide)
   


-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


Re: [PR] SOLR-16395: Convert v2 "schema" modification APIs to JAX-RS [solr]

Posted by "gerlowskija (via GitHub)" <gi...@apache.org>.
gerlowskija commented on PR #3299:
URL: https://github.com/apache/solr/pull/3299#issuecomment-2775490954

   Alright, the JAX-RS code is in place so I've marked this as "Ready for Review".
   
   One thing that I've left out of this PR, that we'll want to think through and handle separately are v2 APIs for "copy-field" modification.  All of our other schema entities (fields, field-types, and dynamic-fields) have names that allow you to address them with nice clean resource-based paths like `PUT or DELETE /collections/<collName>/schema/fields/<fieldName>`.  But copy-fields break this pattern.
   
   I wasn't sure how to handle them, so I've "punted" in this PR.  The best approach I can think of currently is a `POST /schema/copyfields {...}`, but it deserves some more thought/discussion.


-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


Re: [PR] SOLR-16395: Convert v2 "schema" modification APIs to JAX-RS [solr]

Posted by "gerlowskija (via GitHub)" <gi...@apache.org>.
gerlowskija merged PR #3299:
URL: https://github.com/apache/solr/pull/3299


-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


Re: [PR] SOLR-16395: Convert v2 "schema" modification APIs to JAX-RS [solr]

Posted by "gerlowskija (via GitHub)" <gi...@apache.org>.
gerlowskija commented on PR #3299:
URL: https://github.com/apache/solr/pull/3299#issuecomment-2775496621

   Still TODO:
     - manual testing
     - possible integration with #3023 ?
     - some generated SolrRequest fixes
     - check
     - run tests


-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


Re: [PR] SOLR-16395: Convert v2 "schema" modification APIs to JAX-RS [solr]

Posted by "gerlowskija (via GitHub)" <gi...@apache.org>.
gerlowskija commented on code in PR #3299:
URL: https://github.com/apache/solr/pull/3299#discussion_r2029836065


##########
solr/core/src/test/org/apache/solr/rest/schema/TestBulkSchemaAPI.java:
##########
@@ -66,16 +66,6 @@ public void before() throws Exception {
 
     createJettyAndHarness(
         tmpSolrHome, "solrconfig-managed-schema.xml", "schema-rest.xml", "/solr", true, null);
-    if (random().nextBoolean()) {

Review Comment:
   The v2 Schema APIs now differ from v1 by more than just the path prefix, so this quick-and-dirty randomization no longer works.



-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


Re: [PR] SOLR-16395: Convert v2 "schema" modification APIs to JAX-RS [solr]

Posted by "gerlowskija (via GitHub)" <gi...@apache.org>.
gerlowskija commented on PR #3299:
URL: https://github.com/apache/solr/pull/3299#issuecomment-2767112435

   This isn't quite ready for prime-time yet, but I wanted to make the broad strokes available for review if anyone's curious.
   
   Much of the code in this PR is currently in service of making `SchemaManager` (which is responsible for orchestrating "bulk" schema modifications) consume a format that can be used by both v1 and v2 APIs.  Code to expose the new v2 APIs is still 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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org