Ben Humphreys

  • Archive
  • RSS

MongoImport Bug?

Update: Quick hack solution - add a line with an empty JSON object at the start of the file. { }

I’ve come across some odd behaviour when using mongoimport. I’m not sure if it’s an issue with my setup, or a bug in Mongo, but here’s what I’ve found.

  • mongoimport version 2.0.0
  • mongod db version v2.0.0, pdfile version 4.5

The data I’m trying to import is a small subset of NTCIR data. I hope it’s OK to post here in case there’s an issue in the data itself that’s causing the bug.

The first line never gets imported. I’ve tried varying the order, inserting a blank line in the header and it’s always the first line.

Even more confusingly, mongoimport claims it’s working correctly, saying it imported 3 objects:

Then checking the data in the collection returns only 2 results:

Does anyone have any ideas of what this could be?

    • #programming
    • #mongodb
    • #phd
    • #nlp
  • 5 months ago
  • 2
  • Comments
  • Permalink
  • Share
    Tweet

2 Notes/ Hide

  1. determinesek6 liked this
  2. promontoryop3 liked this
  3. security980dek liked this
  4. benhumphreys posted this

Recent comments

Blog comments powered by Disqus
← Previous • Next →

About

Avatar Computational linguistics researcher at Kyoto University, focussing on machine translation. Also learning Japanese, Korean, French and other badassery.
(日本語版)

Me, Elsewhere

  • @benhumphreys on Twitter
  • benhumphreys on github
  • RSS
  • Random
  • Archive
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr