gerlowskija commented on a change in pull request #41: URL: https://github.com/apache/solr/pull/41#discussion_r616593712
########## File path: solr/solr-ref-guide/src/replica-management.adoc ########## @@ -17,14 +17,77 @@ // specific language governing permissions and limitations // under the License. -A replica is a physical copy of a shard. +A replica is a physical copy of a shard. Replicas enhance fail over by providing additional copies of the data +and enhance scalability by providing additional capacity for searching. + +The examples assume you have started Solr via `bin/solr start -c -e techproducts`. [[addreplica]] == ADDREPLICA: Add Replica Add one or more replicas to a shard in a collection. The node name can be specified if the replica is to be created in a specific node. Otherwise, a set of nodes can be specified and the most suitable ones among them will be chosen to create the replica(s). -`/admin/collections?action=ADDREPLICA&collection=_collection_&shard=_shard_&node=_nodeName_` +[.dynamic-tabs] +-- + +[example.tab-pane#v1addreplica] +==== +[.tab-label]*V1 API* + +*Input* + +[source,text] +---- +http://localhost:8983/solr/admin/collections?action=ADDREPLICA&collection=techproducts&shard=shard&node=localhost:8983_solr +---- + +*Output* + +[source,xml] +---- +<response> + <lst name="responseHeader"> + <int name="status">0</int> + <int name="QTime">122</int> + </lst> +</response> Review comment: [Q] Is there a reason you used XML as the output format here, instead of the default JSON? I don't particularly care about the inconsistency, but you might want to change the command above to included the `wt=xml` param, so that a novice user wouldn't be wondering why they get a different format when they try this example... ########## File path: solr/solr-ref-guide/src/shard-management.adoc ########## @@ -205,7 +261,61 @@ Shards can only created with this API for collections that use the 'implicit' ro Use SPLITSHARD for collections created with the 'compositeId' router (`router.key=compositeId`). -`/admin/collections?action=CREATESHARD&shard=_shardName_&collection=_name_` +[.dynamic-tabs] +-- + +[example.tab-pane#v1createshard] +==== +[.tab-label]*V1 API* + +*Input* + +[source,text] +---- +http://localhost:8983/solr/admin/collections?action=CREATESHARD&shard=_shardName_&collection=_name_ Review comment: [0] It might be cool if the v1 and v2 examples here used the same param vals so they were truly equivalent. ########## File path: solr/solr-ref-guide/src/shard-management.adoc ########## @@ -334,7 +474,59 @@ http://localhost:8983/solr/admin/collections?action=DELETESHARD&collection=anoth In the unlikely event of a shard losing its leader, this command can be invoked to force the election of a new leader. -`/admin/collections?action=FORCELEADER&collection=<collectionName>&shard=<shardName>` +[.dynamic-tabs] +-- + +[example.tab-pane#v1forceleader] +==== +[.tab-label]*V1 API* + +*Input* + +[source,text] +---- +http://localhost:8983/solr/admin/collections?action=FORCELEADER&collection=techproducts&shard=shard1 +---- + +*Output* + +[source,xml] +---- +<response> Review comment: ditto, re: we might want to change this to JSON or add `wt=xml` to the request. ########## File path: solr/solr-ref-guide/src/replica-management.adoc ########## @@ -17,14 +17,77 @@ // specific language governing permissions and limitations // under the License. -A replica is a physical copy of a shard. +A replica is a physical copy of a shard. Replicas enhance fail over by providing additional copies of the data +and enhance scalability by providing additional capacity for searching. + +The examples assume you have started Solr via `bin/solr start -c -e techproducts`. [[addreplica]] == ADDREPLICA: Add Replica Add one or more replicas to a shard in a collection. The node name can be specified if the replica is to be created in a specific node. Otherwise, a set of nodes can be specified and the most suitable ones among them will be chosen to create the replica(s). -`/admin/collections?action=ADDREPLICA&collection=_collection_&shard=_shard_&node=_nodeName_` +[.dynamic-tabs] +-- + +[example.tab-pane#v1addreplica] +==== +[.tab-label]*V1 API* + +*Input* + +[source,text] +---- +http://localhost:8983/solr/admin/collections?action=ADDREPLICA&collection=techproducts&shard=shard&node=localhost:8983_solr +---- + +*Output* + +[source,xml] +---- +<response> + <lst name="responseHeader"> + <int name="status">0</int> + <int name="QTime">122</int> + </lst> +</response> Review comment: Also, I'm surprised the actual response content looks so different from the v2-output for this API below. Nothing would surprise me, but I thought v1/v2 here were hitting the same underlying implementation. ########## File path: solr/solr-ref-guide/src/replica-management.adoc ########## @@ -321,7 +412,42 @@ http://localhost:8983/solr/admin/collections?action=DELETEREPLICA&collection=tes Assign an arbitrary property to a particular replica and give it the value specified. If the property already exists, it will be overwritten with the new value. -`/admin/collections?action=ADDREPLICAPROP&collection=collectionName&shard=shardName&replica=replicaName&property=propertyName&property.value=value` +[.dynamic-tabs] +-- + +[example.tab-pane#v1addreplicaprop] +==== +[.tab-label]*V1 API* + +*Input* + +[source,text] +---- +http://localhost:8983/solr/admin/collections?action=ADDREPLICAPROP&collection=collectionName&shard=shardName&replica=replicaName&property=propertyName&property.value=value Review comment: [0] It might be cool if the v1 and v2 examples here used the same param vals so they were truly equivalent. ########## File path: solr/solr-ref-guide/src/replica-management.adoc ########## @@ -409,7 +535,41 @@ http://localhost:8983/solr/admin/collections?action=ADDREPLICAPROP&shard=shard1& Deletes an arbitrary property from a particular replica. -`/admin/collections?action=DELETEREPLICAPROP&collection=collectionName&shard=_shardName_&replica=_replicaName_&property=_propertyName_` +[.dynamic-tabs] +-- + +[example.tab-pane#v1deletereplicaprop] +==== +[.tab-label]*V1 API* + +*Input* + +[source,text] +---- +http://localhost:8983/solr/admin/collections?action=DELETEREPLICAPROP&collection=collectionName&shard=_shardName_&replica=_replicaName_&property=_propertyName_ Review comment: [0] It might be cool if the v1 and v2 examples here used the same param vals so they were truly equivalent. ########## File path: solr/solr-ref-guide/src/shard-management.adoc ########## @@ -21,10 +21,66 @@ In SolrCloud, a shard is a logical partition of a collection. This partition sto The number of shards you have helps to determine how many documents a single collection can contain in total, and also impacts search performance. +The examples assume you have started Solr via `bin/solr start -c -e techproducts`. + [[splitshard]] == SPLITSHARD: Split a Shard -`/admin/collections?action=SPLITSHARD&collection=_name_&shard=_shardID_` +[.dynamic-tabs] +-- + +[example.tab-pane#v1splitshard] +==== +[.tab-label]*V1 API* + +*Input* + +[source,text] +---- +http://localhost:8983/solr/admin/collections?action=SPLITSHARD&collection=techproducts&shard=shard1 +---- + +*Output* + +[source,xml] +---- +<response> Review comment: [0] ditto, re: might be worth either changing the output to JSON or adding `wt=xml` to the request -- 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: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
