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

   🤖 AI Assisted
   
   https://issues.apache.org/jira/browse/SOLR-18453
   
   # Description
   
   First step of [SIP-28: Modernize the JSON update 
API](https://cwiki.apache.org/confluence/spaces/SOLR/pages/467437339/SIP-28+Modernize+the+JSON+update+API)
 (umbrella SOLR-18724). Additive, no behaviour change.
   
   - Deprecates the `json.command` request param on `/update`. It is removed in 
11 (SOLR-18454).
   - Adds `Content-Type: application/vnd.solr.commands+json` for JSON update 
commands, so existing clients can prepare for 11, where `application/json` 
means documents.
   
   # Solution
   
   - `JsonLoader`: one-time deprecation log when a request passes 
`json.command`. The `/update/json/docs` invariant does not trigger it.
   - New content type, parsed as JSON commands on v1 `/update` and 
`/update/json`. Combined with `/update/json/docs` or `json.command=false` it 
gives 400.
   - v2 is unchanged: JSON there stays documents.
   - Ref guide: `indexing-with-update-handlers.adoc`, and a 10.2 note in 
`major-changes-in-solr-10.adoc`. Both call the content type a transition aid.
   - Changelog: `deprecated`.
   
   Backport to `branch_10x` after merge.
   
   # Tests
   
   - `JsonLoaderTest`: commands content type (also with `; charset=`), conflict 
with docs mode gives 400, `/update` routes the new type to the JSON loader.
   - `./gradlew :solr:core:test --tests JsonLoaderTest --tests 
V2UpdateAPIMappingTest --tests NDJsonUpdateTest --tests NDJsonLoaderTest` → 73 
tests, SUCCESS
   - `./gradlew tidy`; `./gradlew check -x test` → BUILD SUCCESSFUL
   
   


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