Fixed bulk insert and search bugs in collection api. Updated documentation.