couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Johnson <>
Subject bulk import
Date Fri, 17 Dec 2010 23:52:42 GMT
I have an XML doc that I am parsing that results in 5M documents. I have 
been successful in serializing this and writing to the database but this 
takes an extremely long time. As a result, I am testing the _bulk_docs 
import but have not been successful.

Below is a snapshot of the file that I am creating to do the bulk 
import, but when I use it, I get the following error:

 >curl -X POST -d @bulk.json
 >{"error":"bad_content_type","reason":"Content-Type must be 

         "docs": [
{ "session_id":"849", "policyID":"trust-to-untrust/4", 
"in_srcIP":"", "in_srcPort":"49174", 
"in_dstIP":"", "in_dstPort":"993", 
"out_srcIP":"", "out_srcPort":"993", 
"out_dstIP":"", "out_dstPort":"38324", "protocol":"tcp" },
{ "session_id":"2127", "policyID":"trust-to-untrust/4", 
"in_srcIP":"", "in_srcPort":"49197", 
"in_dstIP":"", "in_dstPort":"993", 
"out_srcIP":"", "out_srcPort":"993", 
"out_dstIP":"", "out_dstPort":"27540", "protocol":"tcp" },
{ "session_id":"2364", "policyID":"trust-to-untrust/4", 
"in_srcIP":"", "in_srcPort":"49309", 
"in_dstIP":"", "in_dstPort":"5050", 
"out_srcIP":"", "out_srcPort":"5050", 
"out_dstIP":"", "out_dstPort":"38335", "protocol":"tcp" },

View raw message