Types for JSON file using bulk API

Like I mentioned in my previous answer, you can remove the index and type information from your JSON file like this:

{"index":{"_id":"2"}}
{"info":"2", "bob":3}

and then add those to your curl command

curl -XPOST -H 'Content-Type: application/json' localhost:9200/fake/type/_bulk --data-binary @/path/to/your/file.json

Also note that the type information has nothing to do with your field types (keyword, integer, etc), but it is a mapping type, i.e. the place where you define all your index fields

Finally, the _id can only take literal value, but not an object value. You could hash {"$oid":"52287a4ee4b07193f703c23f"} into some string and use that string as ID, though