Hi All,

    I am trying to post data into Solr using curl command. Does anybody
could tell me the difference between the following two methods?

Method1:
curl "http://localhost:8983/solr/update/extract?literal.id=doc1&commit=true";
-F "myfile=@tutorial.html"

The -F flag instructs curl to POST data using the Content-Type
multipart/form-data and supports the uploading of binary files. 

Method2:
curl
"http://localhost:8983/solr/update/extract?literal.id=doc1&defaultField=text&commit=true";
 
--data-binary @tutorial.html  -H 'Content-type:text/html'


   Consider my situation:
   I want to post many different content-types of files into Solr. Which
method should I choose?

  Thank you so much.

Sincerely,
Xiaoha





--
View this message in context: 
http://lucene.472066.n3.nabble.com/Different-methods-of-sending-documents-to-Solr-tp4195725.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to