[ https://issues.apache.org/jira/browse/SOLR-15749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17617410#comment-17617410 ]
Jason Gerlowski edited comment on SOLR-15749 at 10/14/22 2:25 AM: ------------------------------------------------------------------ One option I'd sketched out was {{POST /api/collections/origCollName/commands?action=rename <request-body> }}. It's not perfect. Overall I think we're aiming to have the v2 APIs be as REST-ful as possible, but this is a tough chunk of functionality to fit into that pattern. REST endpoints often have "noun"-based paths, and well, I had trouble coming up with a way to do that for RENAME. The most intuitive thing I came up with was to create a sub-path for the "commands" noun. Solr has historically had a lot of these APIs that are meant to trigger some operation or command, so finding a uniform way to do them at least seemed important. Anyway, not set in stone by any means but it's the best I had at least. By the way: some months ago I put together a [spreadsheet|https://docs.google.com/spreadsheets/d/1HAoBBFPpSiT8mJmgNZKkZAPwfCfPvlc08m5jz3fQBpA/edit?usp=sharing] to inventory all of Solr's APIs and suggest changes to certain v2 API endpoints. (In addition to trying to bring v2 up to parity with v1, we're also still experimenting with the endpoints themselves to find an API that's as clear as possible for users). Anyway, you might find it a helpful reference to see at a glance what our v2 endpoints look like today and what we're (tentatively) trying to align them around. There's also a few useful code pointers in there. RENAME specifically is on line 16 of the "Command APIs" tab. was (Author: gerlowskija): One option I'd sketched out was {{POST /api/collections/origCollName/commands?action=rename {...} }}. It's not perfect. Overall I think we're aiming to have the v2 APIs be as REST-ful as possible, but this is a tough chunk of functionality to fit into that pattern. REST endpoints often have "noun"-based paths, and well, I had trouble coming up with a way to do that for RENAME. The most intuitive thing I came up with was to create a sub-path for the "commands" noun. Solr has historically had a lot of these APIs that are meant to trigger some operation or command, so finding a uniform way to do them at least seemed important. Anyway, not set in stone by any means but it's the best I had at least. By the way: some months ago I put together a [spreadsheet|https://docs.google.com/spreadsheets/d/1HAoBBFPpSiT8mJmgNZKkZAPwfCfPvlc08m5jz3fQBpA/edit?usp=sharing] to inventory all of Solr's APIs and suggest changes to certain v2 API endpoints. (In addition to trying to bring v2 up to parity with v1, we're also still experimenting with the endpoints themselves to find an API that's as clear as possible for users). Anyway, you might find it a helpful reference to see at a glance what our v2 endpoints look like today and what we're (tentatively) trying to align them around. There's also a few useful code pointers in there. RENAME specifically is on line 16 of the "Command APIs" tab. > Create a v2 equivalent of v1 'RENAME' > ------------------------------------- > > Key: SOLR-15749 > URL: https://issues.apache.org/jira/browse/SOLR-15749 > Project: Solr > Issue Type: Sub-task > Components: v2 API > Reporter: Jason Gerlowski > Assignee: Jason Gerlowski > Priority: Major > Labels: V2 > > Solr's 'RENAME' command under the v1 \{{/solr/admin/collections}} endpoint > has no v2 equivalent. This should be remedied to inch v2 closer to parity > with v1 in preparation for eventual v1 deprecation. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org