dsmiley commented on a change in pull request #2356:
URL: https://github.com/apache/lucene-solr/pull/2356#discussion_r579993777



##########
File path: solr/solr-ref-guide/src/solr-control-script-reference.adoc
##########
@@ -902,25 +906,30 @@ The number of documents to export. The default is `100`. 
The value `-1` will exp
 
 *Examples*
 
-Export all documents from a collection `gettingstarted`:
+Export all documents from a collection `gettingstarted` into a file called 
`gettingstarted.json`:
 
 [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
+bin/solr export -url http://localhost:8983/solr/gettingstarted -limit -1 -out 
1MDocs.json.gz
 ----
 
 === Importing Documents to a Collection
 
-Once you have exported documents in a file, you can use the 
<<updatehandlers-in-solrconfig.adoc#,/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.
+Notice the different endpoints used depending on the format.  
+
+*Example: import `json` files*
+
+`curl -X POST --header "Content-Type: application/json" -d 
@gettingstarted.json 
http://localhost:8983/solr/gettingstarted/update/json?commit=true`
 
 *Example: import `jsonl` files*
 
-`curl -X POST -d @gettingstarted.json 
http://localhost:8983/solr/gettingstarted/update/json/docs?commit=true`
+`curl -X POST --header "Content-Type: application/json" -d 
@gettingstarted.json 
http://localhost:8983/solr/gettingstarted/update/json/docs?commit=true`

Review comment:
       Just an FYI... Solr's very own "bin/post" actually has advantages to 
curl.  https://issues.apache.org/jira/browse/SOLR-8937  Looking back at that 
old-ish JIRA, I see that was the stdin case.  I'm not sure if curl is smart 
enough to not put the whole file in RAM for non-stdin.  I think "bin/post" is 
smart about it though.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to