Apache Solr open-source search software
SOLR-10446, SOLR-6736: Ref guide documentation
Ishan Chattopadhyaya2eb324f9bae1
diff --git a/solr/solr-ref-guide/src/configsets-api.adoc b/solr/solr-ref-guide/src/configsets-api.adocindex 1bf76f7485d..2270eb606fe 100644--- a/solr/solr-ref-guide/src/configsets-api.adoc+++ b/solr/solr-ref-guide/src/configsets-api.adoc@@ -32,6 +32,7 @@ The base URL for all API calls is `\http://<hostname>:<port>/solr`.* `/admin/configs?action=CREATE`: <<ConfigSetsAPI-create,create>> a ConfigSet, based on an existing ConfigSet* `/admin/configs?action=DELETE`: <<ConfigSetsAPI-delete,delete>> a ConfigSet* `/admin/configs?action=LIST`: <<ConfigSetsAPI-list,list>> all ConfigSets+* `/admin/configs?action=UPLOAD`: <<ConfigSetsAPI-upload,upload>> a ConfigSet[[ConfigSetsAPI-createCreateaConfigSet]]@@ -169,3 +170,48 @@ http://localhost:8983/solr/admin/configs?action=LIST&wt=json"configSets":["myConfigSet1","myConfig2"]}----++[[ConfigSetsAPI-uploadCreateaConfigSet]]++[[ConfigSetsAPI-upload]]+== Upload a ConfigSet++`/admin/configs?action=UPLOAD&name=_name_`++Upload a ConfigSet, sent in as a zipped file. Please note that a ConfigSet is uploaded in a "trusted" mode if authentication is enabled and this upload operation is performed as an authenticated request. Without authentication, a ConfigSet is uploaded in an "untrusted" mode. Upon creation of a collection using an "untrusted" ConfigSet, the following functionality would not work:++ * RunExecutableListener does not initialize, if specified in the ConfigSet.+ * DataImportHandler's ScriptTransformer does not initialize, if specified in the ConfigSet.+ * XSLT transformer (tr parameter) cannot be used at request processing time.+ * StatelessScriptUpdateProcessor does not initialize, if specified in the ConfigSet.++[[ConfigSetsAPI-Input]]+=== Input++// TODO: Change column width to %autowidth.spread when https://github.com/asciidoctor/asciidoctor-pdf/issues/599 is fixed++[cols="20,15,10,15,40",options="header"]+|===+|Key |Type |Required |Default |Description+|name |String |Yes | |ConfigSet to be created+|===++The body of the request should contain a zipped config set.++[[ConfigSetsAPI-Output]]+=== Output++*Output Content*++The output will include the status of the request. If the status is anything other than "success", an error message will explain why the request failed.++[[ConfigSetsAPI-Examples]]+=== Examples++Create a ConfigSet named 'myConfigSet' based on a 'predefinedTemplate' ConfigSet, overriding the immutable property to false.++[source,text]+----+curl -X POST -d @myconfigset.zip http://localhost:8983/solr/admin/configs?action=CREATE&name=myConfigSet --header "Content-Type:text/xml"+----+diff --git a/solr/solr-ref-guide/src/using-solrj.adoc b/solr/solr-ref-guide/src/using-solrj.adocindex 785077684fe..fb92bd9453e 100644--- a/solr/solr-ref-guide/src/using-solrj.adoc+++ b/solr/solr-ref-guide/src/using-solrj.adoc@@ -35,8 +35,12 @@ SolrClient solr = new HttpSolrClient.Builder(urlString).build();.SolrCloud client[source,java]----+// Using a ZK Host StringString zkHostString = "zkServerA:2181,zkServerB:2181,zkServerC:2181/solr";SolrClient solr = new CloudSolrClient.Builder().withZkHost(zkHostString).build();++// Using already running Solr nodes+SolrClient solr = new CloudSolrClient.Builder().withSolrUrl("http://localhost:8983/solr").build();----Once you have a `SolrClient`, you can use it by calling methods like `query()`, `add()`, and `commit()`.