Apache Lucene open-source search software
SOLR-14270: Move .gz example to CLI page; Remove bin/solr export from command-line-utilities.adoc
Cassandra Targett27523b5e4092
diff --git a/solr/solr-ref-guide/src/command-line-utilities.adoc b/solr/solr-ref-guide/src/command-line-utilities.adocindex 2e5c192f6d6..83be37205d4 100644--- a/solr/solr-ref-guide/src/command-line-utilities.adoc+++ b/solr/solr-ref-guide/src/command-line-utilities.adoc@@ -154,33 +154,3 @@ Unlike the CLUSTERPROP command on the <<cluster-node-management.adoc#clusterprop----./server/scripts/cloud-scripts/zkcli.sh -zkhost 127.0.0.1:2181 -cmd clusterprop -name urlScheme -val https------=== Export Data from a Collection to a File--This command downloads documents from all shards in parallel and write the documents to a single file. The supported format are `jsonl` and `javabin`.--Arguments are:--`-url`:: (Required) The URL of the collection.--`-out`:: (Optional) Name of the file to write to. default file name is `<collection-name>.json`. If the file name ends with `.json.gz` , the output is a zip file of JSON.--`-format`:: (Optional) Supported values are `json` or `javabin`.--`-limit`:: (Optional) No:of docs to export. By default the entire collection is exported.--`-fields`:: (Optional) Fields to be exported. By default, all fields are exported.--Example 1: Export all documents in a collection `gettingstarted` into a file called `gettingstarted.json`:--[source,bash]------bin/solr export -url http://localhost:8983/solr/gettingstarted-------Example 2: export 1M docs of collection `gettingstarted` into a file called `1MDocs.json.gz` as a zipped JSON file:--[source,bash]------bin/solr export -url http://localhost:8983/solr/gettingstarted -out 1MDocs.json.gz-----diff --git a/solr/solr-ref-guide/src/solr-control-script-reference.adoc b/solr/solr-ref-guide/src/solr-control-script-reference.adocindex cfa68d8becc..9349fe5081a 100644--- a/solr/solr-ref-guide/src/solr-control-script-reference.adoc+++ b/solr/solr-ref-guide/src/solr-control-script-reference.adoc@@ -896,7 +896,7 @@ The `bin/solr export` command takes the following parameters:The file format of the export, `jsonl` (default) or `javabin`. Choosing `javabin` exports to a file with extension `.javabin` which is the native Solr format. This is compact and faster to import.`out`::-The file name of the export.+The file name of the export. If the file name ends with `json.gz` the output will be compressed into a .gz file.`query`::A custom query. The default is `\*:*` which will export all documents.@@ -907,13 +907,20 @@ A comma separated list of fields to be exported.`limit`::The number of documents to export. The default is `100`. The value `-1` will export all documents.-*Example*+*Examples*Export all documents from a collection `gettingstarted`:[source,bash]bin/solr export -url http://localhost:8983/solr/gettingstarted limit -1+Export all documents of collection `gettingstarted` into a file called `1MDocs.json.gz` as a zipped JSON file:++[source,bash]+----+bin/solr export -url http://localhost:8983/solr/gettingstarted -1 -out 1MDocs.json.gz+----+=== Importing Documents to a CollectionOnce you have exported documents in a file, you can use the <<updatehandlers-in-solrconfig.adoc#updatehandlers-in-solrconfig,/update request handler>> to import them to a new Solr collection.