[ 
https://issues.apache.org/jira/browse/SOLR-16372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17693213#comment-17693213
 ] 

Jason Gerlowski edited comment on SOLR-16372 at 2/24/23 2:17 PM:
-----------------------------------------------------------------

Commenting here to describe the work I intend this ticket to cover in a bit 
more detail.

Firstly, while the move to JAX-RS and cosmetic improvements to the API 
endpoints themselves are conceptually separate, since they both touch nearly 
identical patches of code, it makes a lot of sense to tackle them together in 
the same PR(s).  So that's my intention here: to cover both the JAX-RS 
migration and cosmetic improvements under this ticket. 

With that in mind, let's list out the APIs that this ticket covers.  With only 
a few exceptions, proposed cosmetic improvements to Solr's v2 APIs were 
discussed in bulk and have been tracked in the spreadsheet 
[here|https://docs.google.com/spreadsheets/d/1HAoBBFPpSiT8mJmgNZKkZAPwfCfPvlc08m5jz3fQBpA/edit?usp=sharing].
  So the information below is largely a summary of that.

To be a bit more explicit about the APIs that I intend this ticket to cover:

* "List Collections" API 
** Current: GET /api/cluster and GET /api/collections
** Proposed: GET /api/collections
* "Create Collection" API 
** Current: POST /api/collections \{"create": \{...\}\}
** Proposed: POST /api/collections \{...\}
* "Get Single Collection" API 
** (No changes proposed, but needs converted to JAX-RS)
* "Modify Collection" API 
** Current: POST /api/collections/collName \{"modify": \{...\}\}
** Proposed: PUT /api/collections/collName \{"propName": "newValue"\}
* "Delete Collection" API 
** (No changes proposed, but needs converted to JAX-RS)
* "Create Collection Prop" API 
** Current: POST /api/collections/collName \{'set-collection-property": 
\{"name": "a", "value": "b"\}\}
** Proposed: PUT /api/collections/collName/properties/propName \{"value": 
"someVal"\}
* "Delete Collection Prop" API 
** Current: POST /api/collections/collName \{'set-collection-property": 
\{"name": "a"\}\}
** Proposed: DELETE /api/collection/collName/properties/propName

Hopefully the explicit list makes it easier for anyone interested to help 
divide-and-conquer some of the work here.

A few other pointers that might be helpful, especially for newcomers:
 * [Some discussion of how APIs work in 
Solr|https://issues.apache.org/jira/browse/SOLR-15737?focusedCommentId=17565076&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17565076]
 (Particularly the "APIs in Solr" section.)
 * [A step-by-step guide to creating APIs using the preferred v2 API 
framework|https://issues.apache.org/jira/browse/SOLR-15737?focusedCommentId=17617923&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17617923]
 * [A recent PR that adds a v2 API, as an 
example|https://github.com/apache/solr/pull/1061/files]


was (Author: gerlowskija):
Commenting here to describe the work I intend this ticket to cover in a bit 
more detail.

Firstly, while the move to JAX-RS and cosmetic improvements to the API 
endpoints themselves are conceptually separate, since they both touch nearly 
identical patches of code, it makes a lot of sense to tackle them together in 
the same PR(s).  So that's my intention here: to cover both the JAX-RS 
migration and cosmetic improvements under this ticket. 

With that in mind, let's list out the APIs that this ticket covers.  With only 
a few exceptions, proposed cosmetic improvements to Solr's v2 APIs were 
discussed in bulk and have been tracked in the spreadsheet 
[here|https://docs.google.com/spreadsheets/d/1HAoBBFPpSiT8mJmgNZKkZAPwfCfPvlc08m5jz3fQBpA/edit?usp=sharing].
  So the information below is largely a summary of that.

To be a bit more explicit about the APIs that I intend this ticket to cover:

* "List Collections" API 
** Current: GET /api/cluster and GET /api/collections
** Proposed: GET /api/collections
* "Create Collection" API 
** Current: POST /api/collections \{"create": \{...\}\}
** Proposed: POST /api/collections \{...\}
* "Get Single Collection" API 
** (No changes proposed, but needs converted to JAX-RS)
* "Modify Collection" API 
** Current: POST /api/collections/collName \{"modify": \{...\}\}
** Proposed: PUT /api/collections/collName \{"propName": "newValue"\}
* "Delete Collection" API 
** (No changes proposed, but needs converted to JAX-RS)
* "Create Collection Prop" API 
** Current: POST /api/collections/collName {'set-collection-property": {"name": 
"a", "value": "b"}}
** Proposed: PUT /api/collections/collName/properties/propName {"value": 
"someVal"}
* "Delete Collection Prop" API 
** Current: POST /api/collections/collName {'set-collection-property": {"name": 
"a"}}
** Proposed: DELETE /api/collection/collName/properties/propName

Hopefully the explicit list makes it easier for anyone interested to help 
divide-and-conquer some of the work here.

A few other pointers that might be helpful, especially for newcomers:
 * [Some discussion of how APIs work in 
Solr|https://issues.apache.org/jira/browse/SOLR-15737?focusedCommentId=17565076&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17565076]
 (Particularly the "APIs in Solr" section.)
 * [A step-by-step guide to creating APIs using the preferred v2 API 
framework|https://issues.apache.org/jira/browse/SOLR-15737?focusedCommentId=17617923&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17617923]
 * [A recent PR that adds a v2 API, as an 
example|https://github.com/apache/solr/pull/1061/files]

> Convert v2 "Collection" and "CollectionProp" APIs to JAX-RS
> -----------------------------------------------------------
>
>                 Key: SOLR-16372
>                 URL: https://issues.apache.org/jira/browse/SOLR-16372
>             Project: Solr
>          Issue Type: Sub-task
>          Components: v2 API
>    Affects Versions: main (10.0)
>            Reporter: Jason Gerlowski
>            Priority: Major
>
> SOLR-16347 introduces a JAX-RS framework for Solr's v2 APIs, but it only 
> moved a few token APIs to that approach.  Our APIs themselves still need 
> migrated.  (See SOLR-16370 for a discussion of the rationale and benefits of 
> doing this).
> This ticket targets Solr's v2 Collection and Collection-prop CRUD APIs, as 
> well as our COLLECTIONSTATUS and CLUSTERSTATUS APIs (formerly 
> {{/admin/collections?action=CLUSTERSTATUS&name=collName}})



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to