fix document format similar to mongodb-backend