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:19:44 UTC

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

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7_0 3b837b5fb -> e68b3cabe


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/e68b3cab
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/e68b3cab
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/e68b3cab

Branch: refs/heads/branch_7_0
Commit: e68b3cabe27c91b2c22f6dd8aac48a0b198440c7
Parents: 3b837b5
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:49:34 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/e68b3cab/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 cae9b13..f2d00ea 100644
--- a/solr/solr-ref-guide/src/configsets-api.adoc
+++ b/solr/solr-ref-guide/src/configsets-api.adoc
@@ -173,9 +173,18 @@ The output will include the status of the request. If the status is anything oth
 
 === Upload ConfigSet 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