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:03 UTC

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

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x e9ae427f9 -> 2184a43e3


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

Branch: refs/heads/branch_7x
Commit: 2184a43e3e10e5b7de2f29c0d4cd59df21754730
Parents: e9ae427
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:54 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/2184a43e/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