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:18:23 UTC

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

Repository: lucene-solr
Updated Branches:
  refs/heads/master c1f146d2f -> 069e6a78e


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

Branch: refs/heads/master
Commit: 069e6a78e0c2201b6b98a129144a63ecc32b4fee
Parents: c1f146d
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:48:06 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/069e6a78/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