mirror of https://github.com/apache/lucene.git
SOLR-14270: Move .gz example to CLI page; Remove bin/solr export from command-line-utilities.adoc
This commit is contained in:
parent
a6e80d004d
commit
27523b5e40
|
@ -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
|
./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
|
|
||||||
----
|
|
||||||
|
|
|
@ -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.
|
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`::
|
`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`::
|
`query`::
|
||||||
A custom query. The default is `\*:*` which will export all documents.
|
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`::
|
`limit`::
|
||||||
The number of documents to export. The default is `100`. The value `-1` will export all documents.
|
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`:
|
Export all documents from a collection `gettingstarted`:
|
||||||
|
|
||||||
[source,bash]
|
[source,bash]
|
||||||
bin/solr export -url http://localhost:8983/solr/gettingstarted limit -1
|
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
|
=== Importing Documents to a Collection
|
||||||
|
|
||||||
Once 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.
|
Once 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.
|
||||||
|
|
Loading…
Reference in New Issue