lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhangxin0804 <zhangxin0...@gmail.com>
Subject Different methods of sending documents to Solr
Date Fri, 27 Mar 2015 02:47:33 GMT
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.

Mime
View raw message