diff --git a/solr/solr-ref-guide/src/command-line-utilities.adoc b/solr/solr-ref-guide/src/command-line-utilities.adoc index 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 <.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.adoc index 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 Collection Once you have exported documents in a file, you can use the <> to import them to a new Solr collection.