You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2017/06/07 14:11:17 UTC

[13/50] [abbrv] lucene-solr:feature/autoscaling: SOLR-10446, SOLR-6736: Ref guide documentation

SOLR-10446, SOLR-6736: Ref guide documentation


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/2eb324f9
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/2eb324f9
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/2eb324f9

Branch: refs/heads/feature/autoscaling
Commit: 2eb324f9bae1553c9c68c4a740a4f865b0ec6da5
Parents: c64f9d6
Author: Ishan Chattopadhyaya <is...@apache.org>
Authored: Fri Jun 2 20:55:05 2017 +0530
Committer: Ishan Chattopadhyaya <is...@apache.org>
Committed: Fri Jun 2 20:56:15 2017 +0530

----------------------------------------------------------------------
 solr/solr-ref-guide/src/configsets-api.adoc | 46 ++++++++++++++++++++++++
 solr/solr-ref-guide/src/using-solrj.adoc    |  4 +++
 2 files changed, 50 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2eb324f9/solr/solr-ref-guide/src/configsets-api.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/configsets-api.adoc b/solr/solr-ref-guide/src/configsets-api.adoc
index 1bf76f7..2270eb6 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"
+----
+

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2eb324f9/solr/solr-ref-guide/src/using-solrj.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/using-solrj.adoc b/solr/solr-ref-guide/src/using-solrj.adoc
index 7850776..fb92bd9 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 String
 String 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()`.