You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/02/18 20:02:50 UTC

[GitHub] [lucene-solr] epugh opened a new pull request #2401: SOLR-11646: Add v2 examples for collections API

epugh opened a new pull request #2401:
URL: https://github.com/apache/lucene-solr/pull/2401


   # Description
   
   Adding V2  examples for the Collections API
   
   # Solution
   
   Copying the pattern in the `configsets-api.adoc`, however I have introduced a NEW way of listing out a CURL command, inspired by our friends writing Elasticsearch docs, that I think is more Cut'n'Paste friendly for when we have lots of JSON.
   
   I'd love feedback on this reworked layout.
   
   # Tests
   
   Visually read the ref guide.
   
   # Checklist
   
   Please review the following and check all that apply:
   
   - [X ] I have reviewed the guidelines for [How to Contribute](https://wiki.apache.org/solr/HowToContribute) 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)
   - [ X] I have developed this patch against the `master` branch.
   - [ X] I have run `./gradlew check`.
   - [ ] I have added tests for my changes.
   - [ X] I have added documentation for the [Ref Guide](https://github.com/apache/lucene-solr/tree/master/solr/solr-ref-guide) (for Solr changes only).
   


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

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



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


[GitHub] [lucene-solr] epugh commented on pull request #2401: SOLR-11646: Add v2 examples for collections API

Posted by GitBox <gi...@apache.org>.
epugh commented on pull request #2401:
URL: https://github.com/apache/lucene-solr/pull/2401#issuecomment-782734824


   Okay, done with `collections-management.adoc` page.  I may forge ahead and do `cluster-node-management.adoc`, this has been good learning for me!


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

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



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


[GitHub] [lucene-solr] epugh commented on a change in pull request #2401: SOLR-11646: Add v2 examples for collections API

Posted by GitBox <gi...@apache.org>.
epugh commented on a change in pull request #2401:
URL: https://github.com/apache/lucene-solr/pull/2401#discussion_r579666373



##########
File path: solr/solr-ref-guide/src/collection-management.adoc
##########
@@ -350,31 +506,46 @@ update commands, which are directed now to `collection2`.
 [[delete]]
 == DELETE: Delete a Collection
 
-`/admin/collections?action=DELETE&name=_collection_`
+The DELETE action is used to delete a collection.
+
+[.dynamic-tabs]
+--
+[example.tab-pane#v1deletecollection]
+====
+[.tab-label]*V1 API*
+
+With the v1 API, the `delete` command must be capitalized as `DELETE`:
+
+[source,bash]
+----
+http://localhost:8983/solr/admin/collections?action=DELETE&name=newCollection

Review comment:
       Okay, went with `techproducts_v2` as the example!




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

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



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


[GitHub] [lucene-solr] epugh commented on pull request #2401: SOLR-11646: Add v2 examples for collections API

Posted by GitBox <gi...@apache.org>.
epugh commented on pull request #2401:
URL: https://github.com/apache/lucene-solr/pull/2401#issuecomment-781602453


   It would be nice to have SOLR-12498 completed since the MODIFYCOLLECTION params are different between v1 and v2 right now, and that isn't covered by my changes, since they should be the same.


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

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



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


[GitHub] [lucene-solr] epugh commented on a change in pull request #2401: SOLR-11646: Add v2 examples for collections API

Posted by GitBox <gi...@apache.org>.
epugh commented on a change in pull request #2401:
URL: https://github.com/apache/lucene-solr/pull/2401#discussion_r582195690



##########
File path: solr/solr-ref-guide/src/cluster-node-management.adoc
##########
@@ -420,7 +632,29 @@ http://localhost:8983/solr/admin/collections?action=REMOVEROLE&role=overseer&nod
 
 Returns the current status of the overseer, performance statistics of various overseer APIs, and the last 10 failures per operation type.
 
-`/admin/collections?action=OVERSEERSTATUS`
+[.dynamic-tabs]
+--
+[example.tab-pane#v1overseerstatus]
+====
+[.tab-label]*V1 API*
+
+[source,bash]
+----
+http://localhost:8983/solr/admin/collections?action=OVERSEERSTATUS
+
+----
+====
+
+[example.tab-pane#v2overseerstatus]
+====
+[.tab-label]*V2 API*
+
+[source,bash]
+----
+curl -X GET http://localhost:8983/api/cluster/overseer -H 'Content-Type: application/json'

Review comment:
       Makes sense, and we don't do it anywhere else!




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

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



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


[GitHub] [lucene-solr] epugh commented on a change in pull request #2401: SOLR-11646: Add v2 examples for collections API

Posted by GitBox <gi...@apache.org>.
epugh commented on a change in pull request #2401:
URL: https://github.com/apache/lucene-solr/pull/2401#discussion_r579660450



##########
File path: solr/solr-ref-guide/src/collection-management.adoc
##########
@@ -350,31 +506,46 @@ update commands, which are directed now to `collection2`.
 [[delete]]
 == DELETE: Delete a Collection
 
-`/admin/collections?action=DELETE&name=_collection_`
+The DELETE action is used to delete a collection.
+
+[.dynamic-tabs]
+--
+[example.tab-pane#v1deletecollection]
+====
+[.tab-label]*V1 API*
+
+With the v1 API, the `delete` command must be capitalized as `DELETE`:
+
+[source,bash]
+----
+http://localhost:8983/solr/admin/collections?action=DELETE&name=newCollection
+----
+====
+
+[example.tab-pane#v2deletecollection]
+====
+[.tab-label]*V2 API*
+
+
+[source,bash]
+----
+curl -X DELETE http://localhost:8983/api/collections/newCollection?omitHeader=true
+----
+====
+--
 
 === DELETE Parameters
 
 `name`::
 The name of the collection to delete. This parameter is required.
 
 `async`::
-Request ID to track this action which will be <<collections-api.adoc#asynchronous-calls,processed asynchronously>>.
+Request ID to track this action which will be <<collections-api.adoc#asynchronous-calls,processed asynchronously>> and is a V1 API only parameter.

Review comment:
       This is a great point, and I hadn't thoguht about it till you mentioned it, but in my quick look, maybe it's just missing.  I'm going to go see if I can fix SOLR-15162 to have the async...




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

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



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


[GitHub] [lucene-solr] gerlowskija commented on a change in pull request #2401: SOLR-11646: Add v2 examples for collections API

Posted by GitBox <gi...@apache.org>.
gerlowskija commented on a change in pull request #2401:
URL: https://github.com/apache/lucene-solr/pull/2401#discussion_r580272949



##########
File path: solr/solr-ref-guide/src/collection-management.adoc
##########
@@ -264,16 +381,33 @@ processing of updates and reloads the collection.
 
 Fetch the names of the collections in the cluster.
 
-`/admin/collections?action=LIST`
-
-=== Examples using LIST
+[.dynamic-tabs]
+--
+[example.tab-pane#v1listcollection]
+====
+[.tab-label]*V1 API*
 
-*Input*
+With the v1 API, the `list` command must be capitalized as `LIST`:
 
-[source,text]
+[source,bash]
 ----
 http://localhost:8983/solr/admin/collections?action=LIST
 ----
+====
+
+[example.tab-pane#v2listcollection]
+====
+[.tab-label]*V2 API*
+
+With the v2 API, the `modify` command is provided as part of the JSON data that contains the required parameters:

Review comment:
       Oh, yep, sorry.
   
   The actual example API call below is hitting the list-collections API, but the description text is talking about the "modify" command.
   
   Put differently, should this read "the `list` command" instead of "the `modify` command"




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

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



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


[GitHub] [lucene-solr] epugh commented on a change in pull request #2401: SOLR-11646: Add v2 examples for collections API

Posted by GitBox <gi...@apache.org>.
epugh commented on a change in pull request #2401:
URL: https://github.com/apache/lucene-solr/pull/2401#discussion_r579658959



##########
File path: solr/solr-ref-guide/src/collection-management.adoc
##########
@@ -156,14 +191,62 @@ http://localhost:8983/solr/admin/collections?action=CREATE&name=newCollection&nu
 [[reload]]
 == RELOAD: Reload a Collection
 
-`/admin/collections?action=RELOAD&name=_name_`
+The RELOAD action is used when you have changed a configuration file in ZooKeeper, like uploading a new `schema.xml`.
+Solr automatically reloads collections when certain files, monitored via a watch in ZooKeeper are changed,
+such as `security.json`.  However, for changes to files in configsets, like uploading a new `schema.xml`, you
+will need to manually trigger the RELOAD.
+
+[.dynamic-tabs]
+--
+[example.tab-pane#v1reloadcollection]
+====
+[.tab-label]*V1 API*
+
+With the v1 API, the `reload` command must be capitalized as `RELOAD`:

Review comment:
       Well look at that!   Apparently there must be some new capacity in Java to somehow handle strings in a case insensitive way that was added ;-).   I always hated that line in the docs ;-)   Thanks for checking this!!!




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

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



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


[GitHub] [lucene-solr] epugh commented on a change in pull request #2401: SOLR-11646: Add v2 examples for collections API

Posted by GitBox <gi...@apache.org>.
epugh commented on a change in pull request #2401:
URL: https://github.com/apache/lucene-solr/pull/2401#discussion_r580437195



##########
File path: solr/solr-ref-guide/src/cluster-node-management.adoc
##########
@@ -169,6 +219,38 @@ http://localhost:8983/solr/admin/collections?action=CLUSTERPROP&name=urlScheme&v
 It is possible to set cluster-wide default values for certain attributes of a collection, using the `defaults` parameter.
 
 *Set/update default values*
+[.dynamic-tabs]

Review comment:
       This section here, I think is maybe ONLY a v2 api?   @gerlowskija thoughts?   




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

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



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


[GitHub] [lucene-solr] epugh commented on a change in pull request #2401: SOLR-11646: Add v2 examples for collections API

Posted by GitBox <gi...@apache.org>.
epugh commented on a change in pull request #2401:
URL: https://github.com/apache/lucene-solr/pull/2401#discussion_r580298998



##########
File path: solr/solr-ref-guide/src/collection-management.adoc
##########
@@ -264,16 +381,33 @@ processing of updates and reloads the collection.
 
 Fetch the names of the collections in the cluster.
 
-`/admin/collections?action=LIST`
-
-=== Examples using LIST
+[.dynamic-tabs]
+--
+[example.tab-pane#v1listcollection]
+====
+[.tab-label]*V1 API*
 
-*Input*
+With the v1 API, the `list` command must be capitalized as `LIST`:
 
-[source,text]
+[source,bash]
 ----
 http://localhost:8983/solr/admin/collections?action=LIST
 ----
+====
+
+[example.tab-pane#v2listcollection]
+====
+[.tab-label]*V2 API*
+
+With the v2 API, the `modify` command is provided as part of the JSON data that contains the required parameters:

Review comment:
       Doh!   right, we don't need this sentence all, cause it is one of the few v2 commands that actually behaves the way a RESTful command should ;-)




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

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



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


[GitHub] [lucene-solr] epugh commented on a change in pull request #2401: SOLR-11646: Add v2 examples for collections API

Posted by GitBox <gi...@apache.org>.
epugh commented on a change in pull request #2401:
URL: https://github.com/apache/lucene-solr/pull/2401#discussion_r579663324



##########
File path: solr/solr-ref-guide/src/collection-management.adoc
##########
@@ -350,31 +506,46 @@ update commands, which are directed now to `collection2`.
 [[delete]]
 == DELETE: Delete a Collection
 
-`/admin/collections?action=DELETE&name=_collection_`
+The DELETE action is used to delete a collection.
+
+[.dynamic-tabs]
+--
+[example.tab-pane#v1deletecollection]
+====
+[.tab-label]*V1 API*
+
+With the v1 API, the `delete` command must be capitalized as `DELETE`:
+
+[source,bash]
+----
+http://localhost:8983/solr/admin/collections?action=DELETE&name=newCollection
+----
+====
+
+[example.tab-pane#v2deletecollection]
+====
+[.tab-label]*V2 API*
+
+
+[source,bash]
+----
+curl -X DELETE http://localhost:8983/api/collections/newCollection?omitHeader=true
+----
+====
+--
 
 === DELETE Parameters
 
 `name`::
 The name of the collection to delete. This parameter is required.
 
 `async`::
-Request ID to track this action which will be <<collections-api.adoc#asynchronous-calls,processed asynchronously>>.
+Request ID to track this action which will be <<collections-api.adoc#asynchronous-calls,processed asynchronously>> and is a V1 API only parameter.

Review comment:
       Okay, I've shot an hour messing around with variations on `collections.collection.delete.json` etc with no luck...    And I want to get back to this.   @noblepaul or @gerlowskija any chance you could look at the fix in SOLR-15162.   I am going to edit back out the caveat about the V1 api on the idea that it will get fixed ;-)   




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

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



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


[GitHub] [lucene-solr] epugh commented on a change in pull request #2401: SOLR-11646: Add v2 examples for collections API

Posted by GitBox <gi...@apache.org>.
epugh commented on a change in pull request #2401:
URL: https://github.com/apache/lucene-solr/pull/2401#discussion_r579660047



##########
File path: solr/solr-ref-guide/src/collection-management.adoc
##########
@@ -264,16 +381,33 @@ processing of updates and reloads the collection.
 
 Fetch the names of the collections in the cluster.
 
-`/admin/collections?action=LIST`
-
-=== Examples using LIST
+[.dynamic-tabs]
+--
+[example.tab-pane#v1listcollection]
+====
+[.tab-label]*V1 API*
 
-*Input*
+With the v1 API, the `list` command must be capitalized as `LIST`:
 
-[source,text]
+[source,bash]
 ----
 http://localhost:8983/solr/admin/collections?action=LIST
 ----
+====
+
+[example.tab-pane#v2listcollection]
+====
+[.tab-label]*V2 API*
+
+With the v2 API, the `modify` command is provided as part of the JSON data that contains the required parameters:

Review comment:
       Can you elaborate?  I checked and V1 is "modifycollection", but in v2 we shortened it to "modify", at least accoridng to the introspection of the api and my quick test!




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

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



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


[GitHub] [lucene-solr] epugh commented on a change in pull request #2401: SOLR-11646: Add v2 examples for collections API

Posted by GitBox <gi...@apache.org>.
epugh commented on a change in pull request #2401:
URL: https://github.com/apache/lucene-solr/pull/2401#discussion_r579658755



##########
File path: solr/solr-ref-guide/src/collection-management.adoc
##########
@@ -22,7 +22,42 @@ A collection is a single logical index that uses a single Solr configuration fil
 [[create]]
 == CREATE: Create a Collection
 
-`/admin/collections?action=CREATE&name=_name_`
+The CREATE action is used to create new collection of data.
+
+[.dynamic-tabs]
+--
+[example.tab-pane#v1createcollection]
+====
+[.tab-label]*V1 API*
+
+With the v1 API, the `create` command must be capitalized as `CREATE`:
+
+[source,bash]
+----
+http://localhost:8983/solr/admin/collections?action=CREATE&name=newCollection
+
+----
+====
+
+[example.tab-pane#v2createcollection]
+====
+[.tab-label]*V2 API*
+
+With the v2 API, the `create` command is provided as part of the JSON data that contains the required parameters:
+
+[source,bash]
+----
+curl -X POST http://localhost:8983/api/collections?omitHeader=true -H 'Content-Type: application/json' -d'
+  {
+    "create": {
+      "name": "newCollection",
+      "numShards": 1

Review comment:
       Thanks for reviewing!   So, I just tried the v1 api call, and it turns out NOW you need to have numShards, otherwise you get `"numShards is a required param (when using CompositeId router).`, so updating the v1 api example.   




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

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



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


[GitHub] [lucene-solr] epugh commented on pull request #2401: SOLR-11646: Add v2 examples for collections API

Posted by GitBox <gi...@apache.org>.
epugh commented on pull request #2401:
URL: https://github.com/apache/lucene-solr/pull/2401#issuecomment-783536071


   Okay, done with `cluster-node-management.adoc`.    The section about "Setting Cluster-Wide Defaults", I think there is no V1 versus V2, only a v2?  


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

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



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


[GitHub] [lucene-solr] epugh commented on a change in pull request #2401: SOLR-11646: Add v2 examples for collections API

Posted by GitBox <gi...@apache.org>.
epugh commented on a change in pull request #2401:
URL: https://github.com/apache/lucene-solr/pull/2401#discussion_r579661513



##########
File path: solr/solr-ref-guide/src/collection-management.adoc
##########
@@ -350,31 +506,46 @@ update commands, which are directed now to `collection2`.
 [[delete]]
 == DELETE: Delete a Collection
 
-`/admin/collections?action=DELETE&name=_collection_`
+The DELETE action is used to delete a collection.
+
+[.dynamic-tabs]
+--
+[example.tab-pane#v1deletecollection]
+====
+[.tab-label]*V1 API*
+
+With the v1 API, the `delete` command must be capitalized as `DELETE`:
+
+[source,bash]
+----
+http://localhost:8983/solr/admin/collections?action=DELETE&name=newCollection
+----
+====
+
+[example.tab-pane#v2deletecollection]
+====
+[.tab-label]*V2 API*
+
+
+[source,bash]
+----
+curl -X DELETE http://localhost:8983/api/collections/newCollection?omitHeader=true
+----
+====
+--
 
 === DELETE Parameters
 
 `name`::
 The name of the collection to delete. This parameter is required.
 
 `async`::
-Request ID to track this action which will be <<collections-api.adoc#asynchronous-calls,processed asynchronously>>.
+Request ID to track this action which will be <<collections-api.adoc#asynchronous-calls,processed asynchronously>> and is a V1 API only parameter.

Review comment:
       Really appreicate your digging through this on a detailed level!




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

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



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


[GitHub] [lucene-solr] gerlowskija commented on a change in pull request #2401: SOLR-11646: Add v2 examples for collections API

Posted by GitBox <gi...@apache.org>.
gerlowskija commented on a change in pull request #2401:
URL: https://github.com/apache/lucene-solr/pull/2401#discussion_r579481691



##########
File path: solr/solr-ref-guide/src/collection-management.adoc
##########
@@ -22,7 +22,42 @@ A collection is a single logical index that uses a single Solr configuration fil
 [[create]]
 == CREATE: Create a Collection
 
-`/admin/collections?action=CREATE&name=_name_`
+The CREATE action is used to create new collection of data.
+
+[.dynamic-tabs]
+--
+[example.tab-pane#v1createcollection]
+====
+[.tab-label]*V1 API*
+
+With the v1 API, the `create` command must be capitalized as `CREATE`:
+
+[source,bash]
+----
+http://localhost:8983/solr/admin/collections?action=CREATE&name=newCollection
+
+----
+====
+
+[example.tab-pane#v2createcollection]
+====
+[.tab-label]*V2 API*
+
+With the v2 API, the `create` command is provided as part of the JSON data that contains the required parameters:
+
+[source,bash]
+----
+curl -X POST http://localhost:8983/api/collections?omitHeader=true -H 'Content-Type: application/json' -d'
+  {
+    "create": {
+      "name": "newCollection",
+      "numShards": 1

Review comment:
       [0] This is small potatoes, but should we pass the same parameters in the v2 request and v1 requests, so that they're equivalent to one another?

##########
File path: solr/solr-ref-guide/src/collection-management.adoc
##########
@@ -156,14 +191,62 @@ http://localhost:8983/solr/admin/collections?action=CREATE&name=newCollection&nu
 [[reload]]
 == RELOAD: Reload a Collection
 
-`/admin/collections?action=RELOAD&name=_name_`
+The RELOAD action is used when you have changed a configuration file in ZooKeeper, like uploading a new `schema.xml`.
+Solr automatically reloads collections when certain files, monitored via a watch in ZooKeeper are changed,
+such as `security.json`.  However, for changes to files in configsets, like uploading a new `schema.xml`, you
+will need to manually trigger the RELOAD.
+
+[.dynamic-tabs]
+--
+[example.tab-pane#v1reloadcollection]
+====
+[.tab-label]*V1 API*
+
+With the v1 API, the `reload` command must be capitalized as `RELOAD`:

Review comment:
       Is this true?  lower-case "reload" appears to work for me on master:
   
   ```
   ➜  solr-9.0.0-SNAPSHOT git:(master) curl -ilk -X GET "http://localhost:8983/solr/admin/collections?action=reload&name=foo"
   HTTP/1.1 200 OK
   ...
   {
     "responseHeader":{
       "status":0,
       "QTime":486},
     "success":{
       "localhost:8983_solr":{
         "responseHeader":{
           "status":0,
           "QTime":447}}}}
   ```

##########
File path: solr/solr-ref-guide/src/collection-management.adoc
##########
@@ -264,16 +381,33 @@ processing of updates and reloads the collection.
 
 Fetch the names of the collections in the cluster.
 
-`/admin/collections?action=LIST`
-
-=== Examples using LIST
+[.dynamic-tabs]
+--
+[example.tab-pane#v1listcollection]
+====
+[.tab-label]*V1 API*
 
-*Input*
+With the v1 API, the `list` command must be capitalized as `LIST`:

Review comment:
       Is this true?  Lowercase works for me on master...
   
   ```
   ➜  solr-9.0.0-SNAPSHOT git:(master) curl -k -X GET "http://localhost:8983/solr/admin/collections?action=list" 
   {
     "responseHeader":{
       "status":0,
       "QTime":0},
     "collections":["foo"]}
     ```

##########
File path: solr/solr-ref-guide/src/collection-management.adoc
##########
@@ -350,31 +506,46 @@ update commands, which are directed now to `collection2`.
 [[delete]]
 == DELETE: Delete a Collection
 
-`/admin/collections?action=DELETE&name=_collection_`
+The DELETE action is used to delete a collection.
+
+[.dynamic-tabs]
+--
+[example.tab-pane#v1deletecollection]
+====
+[.tab-label]*V1 API*
+
+With the v1 API, the `delete` command must be capitalized as `DELETE`:

Review comment:
       Is this true?  Lowercase works for me on master:
   
   ```
   ➜  solr-9.0.0-SNAPSHOT git:(master) curl -k -X GET "http://localhost:8983/solr/admin/collections?action=delete&name=baz"
   {
     "responseHeader":{
       "status":0,
       "QTime":528},
     "success":{
       "localhost:8983_solr":{
         "responseHeader":{
           "status":0,
           "QTime":288}}}}
   ```

##########
File path: solr/solr-ref-guide/src/collection-management.adoc
##########
@@ -350,31 +506,46 @@ update commands, which are directed now to `collection2`.
 [[delete]]
 == DELETE: Delete a Collection
 
-`/admin/collections?action=DELETE&name=_collection_`
+The DELETE action is used to delete a collection.
+
+[.dynamic-tabs]
+--
+[example.tab-pane#v1deletecollection]
+====
+[.tab-label]*V1 API*
+
+With the v1 API, the `delete` command must be capitalized as `DELETE`:
+
+[source,bash]
+----
+http://localhost:8983/solr/admin/collections?action=DELETE&name=newCollection
+----
+====
+
+[example.tab-pane#v2deletecollection]
+====
+[.tab-label]*V2 API*
+
+
+[source,bash]
+----
+curl -X DELETE http://localhost:8983/api/collections/newCollection?omitHeader=true
+----
+====
+--
 
 === DELETE Parameters
 
 `name`::
 The name of the collection to delete. This parameter is required.
 
 `async`::
-Request ID to track this action which will be <<collections-api.adoc#asynchronous-calls,processed asynchronously>>.
+Request ID to track this action which will be <<collections-api.adoc#asynchronous-calls,processed asynchronously>> and is a V1 API only parameter.

Review comment:
       I wonder if this was done intentionally or is just something that Noble or whoever forgot to put in the apispec file.  It's a real shame to have to document stuff that's almost surely just accidental oversight. 🤷 
   
   But I respect that you don't want to bundle in any actual API changes to this PR.

##########
File path: solr/solr-ref-guide/src/collection-management.adoc
##########
@@ -210,12 +293,46 @@ http://localhost:8983/solr/admin/collections?action=RELOAD&name=newCollection&wt
 [[modifycollection]]
 == MODIFYCOLLECTION: Modify Attributes of a Collection
 
-`/admin/collections?action=MODIFYCOLLECTION&collection=_<collection-name>_&__<attribute-name>__=__<attribute-value>__&__<another-attribute-name>__=__<another-value>__&__<yet_another_attribute_name>__=`
-
-It's possible to edit multiple attributes at a time. Changing these values only updates the z-node on ZooKeeper, they do not change the topology of the collection. For instance, increasing `replicationFactor` will _not_ automatically add more replicas to the collection but _will_ allow more ADDREPLICA commands to succeed.
+It's possible to edit multiple attributes at a time. Changing these values only updates the znode on ZooKeeper, they do not change the topology of the collection. For instance, increasing `replicationFactor` will _not_ automatically add more replicas to the collection but _will_ allow more ADDREPLICA commands to succeed.
 
 An attribute can be deleted by passing an empty value. For example, `yet_another_attribute_name=` (with no value) will delete the `yet_another_attribute_name` parameter from the collection.
 
+[.dynamic-tabs]
+--
+[example.tab-pane#v1modifycollection]
+====
+[.tab-label]*V1 API*
+
+With the v1 API, the `modifycollection` command must be capitalized as `MODIFYCOLLECTION`:
+
+[source,bash]
+----
+http://localhost:8983/solr/admin/collections?action=MODIFYCOLLECTION&collection=newCollection&<attribute-name>=<attribute-value>&<another-attribute-name>=<another-value>&<yet_another_attribute_name>=
+
+----
+====
+
+[example.tab-pane#v2modifycollection]
+====
+[.tab-label]*V2 API*
+
+With the v2 API, the `modify` command is provided as part of the JSON data that contains the required parameters:
+
+[source,bash]
+----
+curl -X POST http://localhost:8983/api/collections/newCollection?omitHeader=true -H 'Content-Type: application/json' -d'
+  {
+    "modify": {
+      "replicationFactor": 2

Review comment:
       [0] ditto re: my comment above about the v1 and v2 requests being as equivalent as possible

##########
File path: solr/solr-ref-guide/src/collection-management.adoc
##########
@@ -309,6 +441,30 @@ Aliases that refer to more than 1 collection are not supported.
 * the existing name must not be a Routed Alias.
 * the target name must not be an existing alias.
 
+[.dynamic-tabs]
+--
+[example.tab-pane#v1renamecollection]
+====
+[.tab-label]*V1 API*
+
+With the v1 API, the `rename` command must be capitalized as `RENAME`:

Review comment:
       I don't think this is true?  Lowercase works for me on master...
   
   ```
   ➜  solr-9.0.0-SNAPSHOT git:(master) curl -k -X GET "http://localhost:8983/solr/admin/collections?action=rename&name=foo&target=bar"
   {
     "responseHeader":{
       "status":0,
       "QTime":81}}
   ```

##########
File path: solr/solr-ref-guide/src/collection-management.adoc
##########
@@ -350,31 +506,46 @@ update commands, which are directed now to `collection2`.
 [[delete]]
 == DELETE: Delete a Collection
 
-`/admin/collections?action=DELETE&name=_collection_`
+The DELETE action is used to delete a collection.
+
+[.dynamic-tabs]
+--
+[example.tab-pane#v1deletecollection]
+====
+[.tab-label]*V1 API*
+
+With the v1 API, the `delete` command must be capitalized as `DELETE`:
+
+[source,bash]
+----
+http://localhost:8983/solr/admin/collections?action=DELETE&name=newCollection

Review comment:
       > name=newCollection
   
   This is a real nitpick, there's not much danger of confusion here idt.  But the collection name `newCollection` might confuse readers, as this API call has nothing to do with creating new collections.

##########
File path: solr/solr-ref-guide/src/collection-management.adoc
##########
@@ -264,16 +381,33 @@ processing of updates and reloads the collection.
 
 Fetch the names of the collections in the cluster.
 
-`/admin/collections?action=LIST`
-
-=== Examples using LIST
+[.dynamic-tabs]
+--
+[example.tab-pane#v1listcollection]
+====
+[.tab-label]*V1 API*
 
-*Input*
+With the v1 API, the `list` command must be capitalized as `LIST`:
 
-[source,text]
+[source,bash]
 ----
 http://localhost:8983/solr/admin/collections?action=LIST
 ----
+====
+
+[example.tab-pane#v2listcollection]
+====
+[.tab-label]*V2 API*
+
+With the v2 API, the `modify` command is provided as part of the JSON data that contains the required parameters:

Review comment:
       > the `modify` command
   
     Copy/paste error maybe?




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

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



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


[GitHub] [lucene-solr] gerlowskija commented on a change in pull request #2401: SOLR-11646: Add v2 examples for collections API

Posted by GitBox <gi...@apache.org>.
gerlowskija commented on a change in pull request #2401:
URL: https://github.com/apache/lucene-solr/pull/2401#discussion_r582081552



##########
File path: solr/solr-ref-guide/src/cluster-node-management.adoc
##########
@@ -420,7 +632,29 @@ http://localhost:8983/solr/admin/collections?action=REMOVEROLE&role=overseer&nod
 
 Returns the current status of the overseer, performance statistics of various overseer APIs, and the last 10 failures per operation type.
 
-`/admin/collections?action=OVERSEERSTATUS`
+[.dynamic-tabs]
+--
+[example.tab-pane#v1overseerstatus]
+====
+[.tab-label]*V1 API*
+
+[source,bash]
+----
+http://localhost:8983/solr/admin/collections?action=OVERSEERSTATUS
+
+----
+====
+
+[example.tab-pane#v2overseerstatus]
+====
+[.tab-label]*V2 API*
+
+[source,bash]
+----
+curl -X GET http://localhost:8983/api/cluster/overseer -H 'Content-Type: application/json'

Review comment:
       [0] GET requests don't need a `Content-type` header afaik.  It doesn't do any harm, but might be simpler to leave it off 🤷 

##########
File path: solr/solr-ref-guide/src/cluster-node-management.adoc
##########
@@ -125,7 +145,37 @@ http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS
 
 Add, edit or delete a cluster-wide property.
 
-`/admin/collections?action=CLUSTERPROP&name=_propertyName_&val=_propertyValue_`
+[.dynamic-tabs]
+--
+[example.tab-pane#v1clusterprop]
+====
+[.tab-label]*V1 API*
+
+[source,bash]
+----
+http://localhost:8983/solr/admin/collections?action=CLUSTERPROP&name=propertyName&val=propertyValue

Review comment:
       [0] I mentioned elsewhere that it'd be nice to have the v1 and v2 examples be functionally equivalent where possible.  Not sure if you took that suggestion or not (nbd either way), but if you liked the idea here's another place where it applies.
   

##########
File path: solr/solr-ref-guide/src/cluster-node-management.adoc
##########
@@ -169,6 +219,38 @@ http://localhost:8983/solr/admin/collections?action=CLUSTERPROP&name=urlScheme&v
 It is possible to set cluster-wide default values for certain attributes of a collection, using the `defaults` parameter.
 
 *Set/update default values*
+[.dynamic-tabs]

Review comment:
       Whoa, I don't know that I've ever seen this API before.  You're setting cluster-wide config properties, but it's a different API command from `action=CLUSTERPROP`. Huh.
   
   I knew there were a few v2-only APIs, so I guess that's not a huge surprise, but the overlap between this and `action=CLUSTERPROP` is confusing me a bit.
   
   I guess maybe just document the v2 API and leave a note about there not being a v1 equivalent?  The docs actually looked this way here before, so maybe no changes are 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.

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



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


[GitHub] [lucene-solr] epugh commented on a change in pull request #2401: SOLR-11646: Add v2 examples for collections API

Posted by GitBox <gi...@apache.org>.
epugh commented on a change in pull request #2401:
URL: https://github.com/apache/lucene-solr/pull/2401#discussion_r579660142



##########
File path: solr/solr-ref-guide/src/collection-management.adoc
##########
@@ -350,31 +506,46 @@ update commands, which are directed now to `collection2`.
 [[delete]]
 == DELETE: Delete a Collection
 
-`/admin/collections?action=DELETE&name=_collection_`
+The DELETE action is used to delete a collection.
+
+[.dynamic-tabs]
+--
+[example.tab-pane#v1deletecollection]
+====
+[.tab-label]*V1 API*
+
+With the v1 API, the `delete` command must be capitalized as `DELETE`:
+
+[source,bash]
+----
+http://localhost:8983/solr/admin/collections?action=DELETE&name=newCollection

Review comment:
       humm...  I was starting with  the idea that we created a "newCollection" at the very beginning.    how about "testCollection" throughout?




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

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



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


[GitHub] [lucene-solr] epugh closed pull request #2401: SOLR-11646: Add v2 examples for collections API

Posted by GitBox <gi...@apache.org>.
epugh closed pull request #2401:
URL: https://github.com/apache/lucene-solr/pull/2401


   


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

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



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


[GitHub] [lucene-solr] epugh commented on pull request #2401: SOLR-11646: Add v2 examples for collections API

Posted by GitBox <gi...@apache.org>.
epugh commented on pull request #2401:
URL: https://github.com/apache/lucene-solr/pull/2401#issuecomment-802412504


   Replaced by https://github.com/apache/solr/pull/32


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

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



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