Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 60613 invoked from network); 18 Dec 2010 01:07:33 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 18 Dec 2010 01:07:33 -0000 Received: (qmail 33899 invoked by uid 500); 18 Dec 2010 01:07:31 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 33855 invoked by uid 500); 18 Dec 2010 01:07:31 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 33847 invoked by uid 99); 18 Dec 2010 01:07:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Dec 2010 01:07:31 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of tgking@gmail.com designates 74.125.82.54 as permitted sender) Received: from [74.125.82.54] (HELO mail-ww0-f54.google.com) (74.125.82.54) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Dec 2010 01:07:25 +0000 Received: by wwb31 with SMTP id 31so1204105wwb.23 for ; Fri, 17 Dec 2010 17:07:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=yfuEX5XwNkzEPq+hQKZhMenpMbSl6yo4syEbho1B47U=; b=AdUlvqvdLHsV10Ov/oaALw5c9wjNOmG1LLclBs0GFajQgzjmhlOlQVhMQ/jlebJ4V7 whFzVE9B0W0GSFpm2LmFzL9DosTYWqKBZfwqEyPwHHP4zMJ0ReUmk/KV6F8ast2eXbir ARIbSJYX4psUv+3DRux9S+JuM0vu6P+LktdTA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=GrHmlsOPx35T9ImopUzIBk8i3vULx1Z4mfsdeBXzg0hNNXUyE3ni8JU2hnBVBxgPW3 +azGW/XvfAh/XFTOEo7DP8o5eHfs1D9FhvGbDmv6VA0MFzRFU5uGYmRPYGfWAJj7HL7J 7zIfvWMPYt34nh0l5bCtjLACWihS3DQyvvuL4= MIME-Version: 1.0 Received: by 10.216.174.65 with SMTP id w43mr4476557wel.95.1292634424027; Fri, 17 Dec 2010 17:07:04 -0800 (PST) Sender: tgking@gmail.com Received: by 10.216.38.20 with HTTP; Fri, 17 Dec 2010 17:07:03 -0800 (PST) In-Reply-To: <4D0BF7CA.70908@yahoo.com> References: <4D0BF7CA.70908@yahoo.com> Date: Sat, 18 Dec 2010 12:07:03 +1100 X-Google-Sender-Auth: ked6h3rXEszZBiv7evRGJNod6lk Message-ID: Subject: Re: bulk import From: Tim King To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=001485f1d876ab29600497a4e7af --001485f1d876ab29600497a4e7af Content-Type: text/plain; charset=ISO-8859-1 Try adding this header argument after your curl command: -H "Content-Type: application/json" Tim On 18 December 2010 10:52, Chris Johnson wrote: > 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 http://192.168.1.133:5984/bulktest/_bulk_docs > >{"error":"bad_content_type","reason":"Content-Type must be > application/json"} > > bulk.json > { > "docs": [ > { "session_id":"849", "policyID":"trust-to-untrust/4", > "in_srcIP":"192.168.199.108", "in_srcPort":"49174", > "in_dstIP":"72.14.213.109", "in_dstPort":"993", "out_srcIP":"72.14.213.109", > "out_srcPort":"993", "out_dstIP":"98.207.50.174", "out_dstPort":"38324", > "protocol":"tcp" }, > { "session_id":"2127", "policyID":"trust-to-untrust/4", > "in_srcIP":"192.168.199.117", "in_srcPort":"49197", > "in_dstIP":"17.148.16.38", "in_dstPort":"993", "out_srcIP":"17.148.16.38", > "out_srcPort":"993", "out_dstIP":"98.207.50.174", "out_dstPort":"27540", > "protocol":"tcp" }, > { "session_id":"2364", "policyID":"trust-to-untrust/4", > "in_srcIP":"192.168.199.117", "in_srcPort":"49309", > "in_dstIP":"98.136.48.116", "in_dstPort":"5050", > "out_srcIP":"98.136.48.116", "out_srcPort":"5050", > "out_dstIP":"98.207.50.174", "out_dstPort":"38335", "protocol":"tcp" }, > ] > } --001485f1d876ab29600497a4e7af--