You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by is...@apache.org on 2017/07/19 15:20:13 UTC

lucene-solr:branch_6x: SOLR-6736: Improve the configset UPLOAD example in reference guide

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x 139069100 -> 05a702095


SOLR-6736: Improve the configset UPLOAD example in reference guide


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

Branch: refs/heads/branch_6x
Commit: 05a702095dfd8c34370dcbdd25cb51ce296b0586
Parents: 1390691
Author: Ishan Chattopadhyaya <is...@apache.org>
Authored: Wed Jul 19 20:48:06 2017 +0530
Committer: Ishan Chattopadhyaya <is...@apache.org>
Committed: Wed Jul 19 20:50:02 2017 +0530

----------------------------------------------------------------------
 solr/solr-ref-guide/src/configsets-api.adoc | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/05a70209/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 2bd50ff..97d3163 100644
--- a/solr/solr-ref-guide/src/configsets-api.adoc
+++ b/solr/solr-ref-guide/src/configsets-api.adoc
@@ -204,9 +204,18 @@ The output will include the status of the request. If the status is anything oth
 [[ConfigSetsAPI-Examples.3]]
 === Examples
 
-Create a ConfigSet named 'myConfigSet' based on a 'predefinedTemplate' ConfigSet, overriding the immutable property to false.
+Create a config set named 'myConfigSet' from the zipped file myconfigset.zip. The zip file must be created from within the conf directory (i.e. the solrconfig.xml must be the top level entry in the zip file). Here is an example on how to create the zip file and upload it.
 
 [source,text]
 ----
-curl -X POST -d @myconfigset.zip http://localhost:8983/solr/admin/configs?action=CREATE&name=myConfigSet --header "Content-Type:text/xml"
+$ (cd solr/server/solr/configsets/sample_techproducts_configs/conf && zip -r - *) > myconfigset.zip
+
+$ curl -X POST --header "Content-Type:application/octet-stream" --data-binary @myconfigset.zip "http://localhost:8983/solr/admin/configs?action=UPLOAD&name=myConfigSet"
+----
+
+The same can be achieved using a unix pipe, without creating an intermediate zip file, as follows:
+
+[source,text]
 ----
+$ (cd server/solr/configsets/sample_techproducts_configs/conf && zip -r - *) | curl -X POST --header "Content-Type:application/octet-stream" --data-binary @- "http://localhost:8983/solr/admin/configs?action=UPLOAD&name=myConfigSet"
+----
\ No newline at end of file